]>
Dogcows Code - chaz/openbox/blob - otk/widget.hh
15 enum Direction
{ Horizontal
, Vertical
};
17 typedef std::list
<OtkWidget
*> OtkWidgetList
;
19 OtkWidget(OtkWidget
*parent
, Direction
= Horizontal
);
20 OtkWidget(Style
*style
, Direction direction
= Horizontal
,
21 Cursor cursor
= 0, int bevel_width
= 1);
25 inline Window
getWindow(void) const { return _window
; }
26 inline const OtkWidget
*getParent(void) const { return _parent
; }
27 inline const OtkWidgetList
&getChildren(void) const { return _children
; }
28 inline unsigned int getScreen(void) const { return _screen
; }
29 inline const Rect
&getRect(void) const { return _rect
; }
31 void move(const Point
&to
);
32 void move(int x
, int y
);
34 virtual void resize(const Point
&to
);
35 virtual void resize(int x
, int y
);
37 virtual void setGeometry(const Rect
&new_geom
);
38 virtual void setGeometry(const Point
&topleft
, int width
, int height
);
39 virtual void setGeometry(int x
, int y
, int width
, int height
);
41 inline bool isVisible(void) const { return _visible
; };
42 virtual void show(void);
43 virtual void hide(void);
45 inline bool isFocused(void) const { return _focused
; };
46 virtual void focus(void);
48 inline bool hasGrabbedMouse(void) const { return _grabbed_mouse
; }
50 void ungrabMouse(void);
52 inline bool hasGrabbedKeyboard(void) const { return _grabbed_keyboard
; }
53 bool grabKeyboard(void);
54 void ungrabKeyboard(void);
56 inline const BTexture
*getTexture(void) const { return _texture
; }
57 virtual void setTexture(BTexture
*texture
= 0);
59 virtual void addChild(OtkWidget
*child
, bool front
= false);
60 virtual void removeChild(OtkWidget
*child
);
62 inline bool getStretchableHorz(void) const { return _stretchable_horz
; }
63 void setStretchableHorz(bool s_horz
) { _stretchable_horz
= s_horz
; }
65 inline bool getStretchableVert(void) const { return _stretchable_vert
; }
66 void setStretchableVert(bool s_vert
) { _stretchable_vert
= s_vert
; }
68 inline Cursor
getCursor(void) const { return _cursor
; }
70 inline int getBevelWidth(void) const { return _bevel_width
; }
71 void setBevelWidth(int bevel_width
)
72 { assert(bevel_width
> 0); _bevel_width
= bevel_width
; }
74 inline Direction
getDirection(void) const { return _direction
; }
75 void setDirection(Direction dir
) { _direction
= dir
; }
77 inline Style
*getStyle(void) const { return _style
; }
78 void setStyle(Style
*style
) { _style
= style
; }
87 OtkWidgetList _children
;
98 bool _grabbed_keyboard
;
100 bool _stretchable_vert
;
101 bool _stretchable_horz
;
107 unsigned int _screen
;
This page took 0.037849 seconds and 4 git commands to generate.