Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/external/ceguilua/ceguilua-0.6.2/package/Window.pkg @ 7108

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