Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/lastmanstanding2/src/external/ceguilua/ceguilua-0.6.1/package/Window.pkg @ 8740

Last change on this file since 8740 was 5781, checked in by rgrieder, 15 years ago

Reverted trunk again. We might want to find a way to delete these revisions again (x3n's changes are still available as diff in the commit mails).

  • Property svn:eol-style set to native
File size: 7.2 KB
Line 
1/****************************************
2        Vertical alignment modes
3*****************************************/
4enum VerticalAlignment
5{
6        VA_TOP,
7        VA_CENTRE,
8        VA_BOTTOM
9};
10
11
12/****************************************
13        Horizontal alignment modes
14*****************************************/
15enum HorizontalAlignment
16{
17        HA_LEFT,
18        HA_CENTRE,
19        HA_RIGHT
20};
21
22
23/****************************************
24        Window
25*****************************************/
26class Window //: public EventSet
27{
28        string getType() const;
29        string getName() const;
30
31        bool isDestroyedByParent() const;
32        bool isAlwaysOnTop() const;
33        bool isDisabled(bool localOnly=false) const;
34        bool isVisible(bool localOnly=false) const;
35        bool isActive() const;
36        bool isClippedByParent() const;
37
38        void setDestroyedByParent(bool setting);
39        void setAlwaysOnTop(bool setting);
40        void setEnabled(bool setting);
41        void enable();
42        void disable();
43        void setVisible(bool setting);
44        void show();
45        void hide();
46        void activate();
47        void deactivate();
48
49        void setClippedByParent(bool setting);
50
51        unsigned int getID() const;
52        void setID(unsigned int ID);
53
54        unsigned int getChildCount() const;
55
56        bool isChild(unsigned int ID) const;
57        bool isChild(string name) const;
58        bool isChild(const Window* window) const;
59        bool isChildRecursive(unsigned int ID) const;
60
61        void addChildWindow(string name);
62        void addChildWindow(Window* window);
63
64        void removeChildWindow(unsigned int ID);
65        void removeChildWindow(string name);
66        void removeChildWindow(Window* window);
67
68        tolua_throws|CEGUI::UnknownObjectException,nil| Window* getChild(unsigned int ID) const;
69        tolua_throws|CEGUI::UnknownObjectException,nil| Window* getChild(string name) const;
70        Window* getChildAtIdx(unsigned int ID) const;
71        Window* getActiveChild() const;
72        Window* getChildAtPosition(const Vector2& pos) const;
73    Window* getTargetChildAtPosition(const Vector2& pos) const;
74    Window* getChildRecursive(unsigned int ID) const;
75
76        Window* getParent() const;
77
78        bool isAncestor(unsigned int ID) const;
79        bool isAncestor(string name) const;
80        bool isAncestor(const Window* window) const;
81
82        void setFont(string name);
83        void setFont(Font* font);
84        Font* getFont() const;
85
86        void setText(string text);
87    void insertText(string text, unsigned long position);
88    void appendText(string text);
89        string getText() const;
90
91        bool inheritsAlpha() const;
92        float getAlpha() const;
93        float getEffectiveAlpha() const;
94        void setAlpha(float a);
95        void setInheritsAlpha(bool setting);
96
97        void requestRedraw() const;
98
99        bool isZOrderingEnabled() const;
100        void setZOrderingEnabled(bool setting);
101
102        Rect getPixelRect() const;
103        Rect getInnerRect() const;
104        Rect getUnclippedPixelRect() const;
105        Rect getUnclippedInnerRect() const;
106
107    Size getParentPixelSize(void) const;
108    float getParentPixelWidth(void) const;
109    float getParentPixelHeight(void) const;
110
111        static Window* getCaptureWindow();
112        void setRestoreCapture(bool setting);
113        bool restoresOldCapture() const;
114
115        bool distributesCapturedInputs() const;
116        void setDistributesCapturedInputs(bool setting);
117
118        bool captureInput();
119        void releaseInput();
120
121        bool isCapturedByThis() const;
122        bool isCapturedByAncestor() const;
123        bool isCapturedByChild() const;
124
125        bool isHit(const Vector2& pos) const;
126
127        bool isRiseOnClickEnabled() const;
128        void setRiseOnClickEnabled(bool setting);
129
130        const Image* getMouseCursor() const;
131        void setMouseCursor(MouseCursorImage cursor);
132        void setMouseCursor(const Image* image);
133        void setMouseCursor(string imageset, string image);
134
135        void moveToFront();
136        void moveToBack();
137
138        bool wantsMultiClickEvents() const;
139        bool isMouseAutoRepeatEnabled() const;
140        float getAutoRepeatDelay() const;
141        float getAutoRepeatRate() const;
142        void setWantsMultiClickEvents(bool setting);
143        void setMouseAutoRepeatEnabled(bool setting);
144        void setAutoRepeatDelay(float delay);
145        void setAutoRepeatRate(float rate);
146
147        //void destroy();
148
149        bool isUsingDefaultTooltip() const;
150        Tooltip* getTooltip() const;
151        string getTooltipType() const;
152        string getTooltipText() const;
153        bool inheritsTooltipText() const;
154
155        void setTooltip(Tooltip* tooltip);
156        void setTooltipType(string tooltipType);
157        void setTooltipText(string tip);
158        void setInheritsTooltipText(bool setting);
159
160        bool testClassName(string class_name) const;
161
162        void notifyDragDropItemEnters(DragContainer* item);
163        void notifyDragDropItemLeaves(DragContainer* item);
164        void notifyDragDropItemDropped(DragContainer* item);
165
166        VerticalAlignment getVerticalAlignment() const;
167        HorizontalAlignment getHorizontalAlignment() const;
168
169    // these actually have a const, but tolua++ chokes on that
170    void setVerticalAlignment(VerticalAlignment alignment);
171    void setHorizontalAlignment(HorizontalAlignment alignment);
172
173        string getLookNFeel() const;
174    tolua_throws|CEGUI::Exception,error| void setLookNFeel(string lnf);
175
176    tolua_throws|CEGUI::Exception,error| void setWindowRenderer(string name);
177    string getWindowRendererName() const;
178
179        //RenderCache& getRenderCache()
180
181        bool getModalState() const;
182        void setModalState(bool state);
183
184    tolua_throws|CEGUI::UnknownObjectException,nil| string getUserString(string name) const;
185    bool isUserStringDefined(string name) const;
186    void setUserString(string name, string value);
187
188    void beginInitialisation();
189    void endInitialisation();
190
191        // unified stuff
192        void setArea(const UDim& xpos, const UDim& ypos, const UDim& width, const UDim& height);
193        void setArea(const UVector2& pos, const UVector2& size);
194        void setArea(const URect& area);
195        void setPosition(const UVector2& pos);
196        void setXPosition(const UDim& x);
197        void setYPosition(const UDim& y);
198        void setSize(const UVector2& size);
199        void setWidth(const UDim& width);
200        void setHeight(const UDim& height);
201        void setMaxSize(const UVector2& size);
202        void setMinSize(const UVector2& size);
203
204        const URect& getArea() const;
205        const UVector2& getPosition() const;
206        const UDim& getXPosition() const;
207        const UDim& getYPosition() const;
208        UVector2 getSize() const;
209        UDim getWidth() const;
210        UDim getHeight() const;
211        const UVector2& getMaxSize() const;
212        const UVector2& getMinSize() const;
213
214    // event pass through
215    bool isMousePassThroughEnabled() const;
216    void setMousePassThroughEnabled(bool setting);
217   
218    tolua_throws|CEGUI::Exception,error| void rename(string new_name);
219
220        //////////////////////////////////////////////
221        // PropertySet
222        void setProperty(string name, string value);
223        string getProperty(string name) const;
224        string getPropertyDefault(string name) const;
225        string getPropertyHelp(string name) const;
226
227        bool isPropertyPresent(string name) const;
228        bool isPropertyDefault(string name) const;
229
230    tolua_outside PropertyIterator ceguiLua_getPropertyIterator @ getPropertyIterator() const;
231
232        //////////////////////////////////////////////
233        // EventSet
234        void addEvent(string name);
235        void removeEvent(string name);
236        void removeAllEvents();
237        bool isEventPresent(string name);
238
239        tolua_throws|CEGUI::UnknownObjectException,error| tolua_outside EventConnection LuaFunctorSubscribeEvent @ subscribeEvent(string name, lua_Object funcIndex, lua_Object selfIndex=LUA_NOREF, lua_State*);
240
241        tolua_throws|CEGUI::UnknownObjectException,error| EventConnection subscribeScriptedEvent @ subscribeEvent(string name, string callback_name);
242       
243        void fireEvent(string name, EventArgs& args, string eventnamespace="");
244
245        bool isMuted() const;
246        void setMutedState(bool setting);
247
248    tolua_outside EventIterator ceguiLua_getEventIterator @ getEventIterator() const;
249};
Note: See TracBrowser for help on using the repository browser.