Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/external/ceguilua/ceguilua-0.5.0/package/Window.pkg @ 6837

Last change on this file since 6837 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.1 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        string getText() const;
88
89        bool inheritsAlpha() const;
90        float getAlpha() const;
91        float getEffectiveAlpha() const;
92        void setAlpha(float a);
93        void setInheritsAlpha(bool setting);
94
95        void requestRedraw() const;
96
97        bool isZOrderingEnabled() const;
98        void setZOrderingEnabled(bool setting);
99
100        Rect getPixelRect() const;
101        Rect getInnerRect() const;
102        Rect getUnclippedPixelRect() const;
103        Rect getUnclippedInnerRect() const;
104
105    Size getParentPixelSize(void) const;
106    float getParentPixelWidth(void) const;
107    float getParentPixelHeight(void) const;
108
109        static Window* getCaptureWindow();
110        void setRestoreCapture(bool setting);
111        bool restoresOldCapture() const;
112
113        bool distributesCapturedInputs() const;
114        void setDistributesCapturedInputs(bool setting);
115
116        bool captureInput();
117        void releaseInput();
118
119        bool isCapturedByThis() const;
120        bool isCapturedByAncestor() const;
121        bool isCapturedByChild() const;
122
123        bool isHit(const Vector2& pos) const;
124
125        bool isRiseOnClickEnabled() const;
126        void setRiseOnClickEnabled(bool setting);
127
128        const Image* getMouseCursor() const;
129        void setMouseCursor(MouseCursorImage cursor);
130        void setMouseCursor(const Image* image);
131        void setMouseCursor(string imageset, string image);
132
133        void moveToFront();
134        void moveToBack();
135
136        bool wantsMultiClickEvents() const;
137        bool isMouseAutoRepeatEnabled() const;
138        float getAutoRepeatDelay() const;
139        float getAutoRepeatRate() const;
140        void setWantsMultiClickEvents(bool setting);
141        void setMouseAutoRepeatEnabled(bool setting);
142        void setAutoRepeatDelay(float delay);
143        void setAutoRepeatRate(float rate);
144
145        //void destroy();
146
147        bool isUsingDefaultTooltip() const;
148        Tooltip* getTooltip() const;
149        string getTooltipType() const;
150        string getTooltipText() const;
151        bool inheritsTooltipText() const;
152
153        void setTooltip(Tooltip* tooltip);
154        void setTooltipType(string tooltipType);
155        void setTooltipText(string tip);
156        void setInheritsTooltipText(bool setting);
157
158        bool testClassName(string class_name) const;
159
160        void notifyDragDropItemEnters(DragContainer* item);
161        void notifyDragDropItemLeaves(DragContainer* item);
162        void notifyDragDropItemDropped(DragContainer* item);
163
164        VerticalAlignment getVerticalAlignment() const;
165        HorizontalAlignment getHorizontalAlignment() const;
166
167    // these actually have a const, but tolua++ chokes on that
168    void setVerticalAlignment(VerticalAlignment alignment);
169    void setHorizontalAlignment(HorizontalAlignment alignment);
170
171        string getLookNFeel() const;
172    tolua_throws|CEGUI::Exception,error| void setLookNFeel(string lnf);
173
174    tolua_throws|CEGUI::Exception,error| void setWindowRenderer(string name);
175    string getWindowRendererName() const;
176
177        //RenderCache& getRenderCache()
178
179        bool getModalState() const;
180        void setModalState(bool state);
181
182    tolua_throws|CEGUI::UnknownObjectException,nil| string getUserString(string name) const;
183    bool isUserStringDefined(string name) const;
184    void setUserString(string name, string value);
185
186    void beginInitialisation();
187    void endInitialisation();
188
189        // unified stuff
190        void setArea(const UDim& xpos, const UDim& ypos, const UDim& width, const UDim& height);
191        void setArea(const UVector2& pos, const UVector2& size);
192        void setArea(const URect& area);
193        void setPosition(const UVector2& pos);
194        void setXPosition(const UDim& x);
195        void setYPosition(const UDim& y);
196        void setSize(const UVector2& size);
197        void setWidth(const UDim& width);
198        void setHeight(const UDim& height);
199        void setMaxSize(const UVector2& size);
200        void setMinSize(const UVector2& size);
201
202        const URect& getArea() const;
203        const UVector2& getPosition() const;
204        const UDim& getXPosition() const;
205        const UDim& getYPosition() const;
206        UVector2 getSize() const;
207        UDim getWidth() const;
208        UDim getHeight() const;
209        const UVector2& getMaxSize() const;
210        const UVector2& getMinSize() const;
211
212    // event pass through
213    bool isMousePassThroughEnabled() const;
214    void setMousePassThroughEnabled(bool setting);
215   
216    tolua_throws|CEGUI::Exception,error| void rename(string new_name);
217
218        //////////////////////////////////////////////
219        // PropertySet
220        void setProperty(string name, string value);
221        string getProperty(string name) const;
222        string getPropertyDefault(string name) const;
223        string getPropertyHelp(string name) const;
224
225        bool isPropertyPresent(string name) const;
226        bool isPropertyDefault(string name) const;
227
228    tolua_outside PropertyIterator ceguiLua_getPropertyIterator @ getPropertyIterator() const;
229
230        //////////////////////////////////////////////
231        // EventSet
232        void addEvent(string name);
233        void removeEvent(string name);
234        void removeAllEvents();
235        bool isEventPresent(string name);
236
237        tolua_throws|CEGUI::UnknownObjectException,error| tolua_outside EventConnection LuaFunctorSubscribeEvent @ subscribeEvent(string name, lua_Object funcIndex, lua_Object selfIndex=LUA_NOREF, lua_State*);
238
239        tolua_throws|CEGUI::UnknownObjectException,error| EventConnection subscribeScriptedEvent @ subscribeEvent(string name, string callback_name);
240       
241        void fireEvent(string name, EventArgs& args, string eventnamespace="");
242
243        bool isMuted() const;
244        void setMutedState(bool setting);
245
246    tolua_outside EventIterator ceguiLua_getEventIterator @ getEventIterator() const;
247};
Note: See TracBrowser for help on using the repository browser.