22 #ifndef PAWS_WIDGET_HEADER 23 #define PAWS_WIDGET_HEADER 25 #include <ivideo/graph2d.h> 27 #include <csutil/array.h> 28 #include <csutil/csstring.h> 30 #include <csgeom/csrectrg.h> 31 #include <csgeom/vector2.h> 33 #include <iutil/document.h> 44 #define ATTACH_RIGHT 4 45 #define ATTACH_BOTTOM 8 47 #define PROPORTIONAL_LEFT 32 48 #define PROPORTIONAL_RIGHT 64 49 #define PROPORTIONAL_TOP 128 50 #define PROPORTIONAL_BOTTOM 256 52 #define SCROLL_UP -1000 53 #define SCROLL_DOWN -2000 54 #define SCROLL_THUMB -3000 55 #define SCROLL_AUTO -4000 56 #define SCROLL_SET -5000 58 #define DEFAULT_MIN_HEIGHT 5 59 #define DEFAULT_MIN_WIDTH 5 63 #define RESIZE_RIGHT 4 65 #define RESIZE_BOTTOM 16 74 #define BORDER_INNER_BEVEL 0x1 75 #define BORDER_OUTER_BEVEL 0x2 76 #define BORDER_REVERSED 0x4 77 #define BORDER_BUMP (BORDER_OUTER_BEVEL) 78 #define BORDER_RAISED (BORDER_INNER_BEVEL|BORDER_OUTER_BEVEL) 79 #define BORDER_SUNKEN (BORDER_REVERSED|BORDER_OUTER_BEVEL) 80 #define BORDER_ETCHED (BORDER_REVERSED|BORDER_RAISED) 83 #define DEFAULT_FONT_SIZE 12 85 #define DEFAULT_FONT_STYLE 0 86 #define FONT_STYLE_DROPSHADOW 1 87 #define FONT_STYLE_BOLD 2 428 return visible && (!parent || parent->
IsVisible());
551 return children.Get(i);
561 return children.GetSize();
661 virtual bool Load(iDocumentNode* node);
826 if(hasFocus)
return true;
836 if(!hasFocus)
return;
919 virtual bool OnMouseDown(
int button,
int modifiers,
int x,
int y);
927 virtual bool OnMouseUp(
int button,
int modifiers,
int x,
int y);
935 virtual bool OnDoubleClick(
int button,
int modifiers,
int x,
int y);
981 virtual bool OnKeyDown(utf32_char keyCode, utf32_char keyChar,
int modifiers);
1051 name.Replace(newName);
1053 closeName.Append(
"_close");
1079 virtual void MoveTo(
int x,
int y);
1087 virtual void CenterTo(
int x,
int y);
1100 virtual void Resize(
int flags);
1110 virtual void Resize(
int dx,
int dy,
int flags);
1120 virtual void SetSize(
int newWidth,
int newHeight);
1125 virtual void SetForceSize(
int newWidth,
int newHeight);
1132 virtual void UseBorder(
const char* style = 0);
1221 if(parent)
return parent->
OnScroll(scrollDirection, widget);
1288 alwaysOnTop = value;
1310 toolTip.Replace(text);
1336 toolTip.Replace(defaultToolTip);
1373 factory = myfactory;
1393 return screenFrame.Width();
1398 int desktop = graphics2D->GetWidth();
1402 float value = (
float)myValue;
1404 float ret = (value * desktop) / 800.0f + 0.5f;
1415 return screenFrame.Height();
1420 int desktop = graphics2D->GetHeight();
1424 float value = (
float)myValue;
1426 float ret = (value * desktop) / 600.0f + 0.5f;
1435 int desktop = graphics2D->GetWidth();
1446 int desktop = graphics2D->GetHeight();
1485 void DrawWidgetText(
const char* text,
int x,
int y,
int style=-1);
1505 min_height = height;
1522 max_height = height;
1531 contextMenuFile = fileName;
1579 void SetFont(
const char* fontName,
int Size=0);
1602 iFont*
GetFont(
bool scaled =
true);
1641 virtual bool Contains(
int x,
int y);
1756 virtual void Dump(csString tab =
"");
1840 subscribedVar = dataname;
1854 bool SetTitle(
const char* text,
const char* image,
const char* align,
const char* close_button,
const bool shadowTitle =
true);
1869 needsRender = needs;
1920 return name.GetDataSafe();
1924 virtual void SetProperty(
const char* ptr,
double value);
1948 virtual void Register(
const char*
name);
1962 Register(
"pawsWidget");
1972 #define CREATE_PAWS_FACTORY( factoryName ) \ 1973 class factoryName##Factory : public pawsWidgetFactory \ 1976 factoryName##Factory( ) \ 1978 Register( #factoryName ); \ 1981 pawsWidget* Create() \ 1983 return new factoryName( ); \ 1985 pawsWidget* Create(const pawsWidget* origin)\ 1987 const factoryName * widget = dynamic_cast<const factoryName *>(origin);\ 1990 return new factoryName(*widget);\
A specific MathEnvironment to be used in a MathScript.
Main PlaneShift Window manager.
static PawsManager & GetSingleton(void)
A simple list box widget.
This is a class that draws the border around a widget.
PAWS_WIDGET_SCRIPT_EVENTS