31 #include "common/array.h" 32 #include "common/list.h" 33 #include "hpl1/engine/gui/GuiTypes.h" 34 #include "hpl1/engine/system/low_level_system.h" 57 tGuiCallbackFunc mpFunc;
74 void Update(
float afTimeStep);
80 void AddCallback(eGuiMessage aMessage,
void *apObject, tGuiCallbackFunc apFunc);
82 eWidgetType GetType() {
return mType; }
88 bool PointIsInside(
const cVector2f &avPoint,
bool abOnlyClipped);
92 void AttachChild(
iWidget *apChild);
93 void RemoveChild(
iWidget *apChild);
97 cGuiSet *GetSet() {
return mpSet; }
99 iWidget *GetParent() {
return mpParent; }
101 void SetEnabled(
bool abX);
103 void SetVisible(
bool abX);
108 void SetName(
const tString &asName) { msName = asName; }
109 const tString &GetName() {
return msName; }
111 void SetText(
const tWString &asText);
112 const tWString &GetText() {
return msText; }
114 FontData *GetDefaultFontType() {
return mpDefaultFontType; }
115 void SetDefaultFontType(
FontData *apFont) { mpDefaultFontType = apFont; }
117 const cColor &GetDefaultFontColor() {
return mDefaultFontColor; }
118 void SetDefaultFontColor(
const cColor &aColor) { mDefaultFontColor = aColor; }
120 const cVector2f &GetDefaultFontSize() {
return mvDefaultFontSize; }
121 void SetDefaultFontSize(
const cVector2f &avSize) { mvDefaultFontSize = avSize; }
123 void SetClipActive(
bool abX) { mbClipsGraphics = abX; }
124 bool GetClipActive() {
return mbClipsGraphics; }
126 void SetPosition(
const cVector3f &avPos);
127 void SetGlobalPosition(
const cVector3f &avPos);
134 bool ClipsGraphics();
136 bool GetMouseIsOver() {
return mbMouseIsOver; }
138 bool IsConnectedTo(
iWidget *apWidget,
bool abIsStartWidget =
true);
139 bool IsConnectedToChildren() {
return mbConnectedToChildren; }
140 void SetConnectedToChildren(
bool abX) { mbConnectedToChildren = abX; }
147 virtual void OnLoadGraphics() {}
149 virtual void OnChangeSize() {}
150 virtual void OnChangePosition() {}
151 virtual void OnChangeText() {}
153 virtual void OnInit() {}
155 virtual void OnDraw(
float afTimeStep,
cGuiClipRegion *apClipRegion) {}
156 virtual void OnDrawAfterClip(
float afTimeStep,
cGuiClipRegion *apClipRegion) {}
158 virtual void OnUpdate(
float afTimeStep) {}
160 virtual bool OnMessage(eGuiMessage aMessage,
cGuiMessageData &aData) {
return false; }
164 virtual bool OnMouseDoubleClick(
cGuiMessageData &aData) {
return false; }
185 void DrawSkinText(
const tWString &asText, eGuiSkinFont aFont,
const cVector3f &avPosition,
186 eFontAlign aAlign = eFontAlign_Left);
188 void DrawDefaultText(
const tWString &asText,
189 const cVector3f &avPosition, eFontAlign aAlign);
191 void SetPositionUpdated();
226 bool mbClipsGraphics;
230 bool mbConnectedToChildren;
233 void SetMouseIsOver(
bool abX) { mbMouseIsOver = abX; }
238 bool mbPositionIsUpdated;
243 #endif // HPL_WIDGET_H
Definition: GuiGfxElement.h:72
Definition: font_data.h:67
Definition: GuiTypes.h:263
Definition: list_intern.h:51