]>
Dogcows Code - chaz/openbox/blob - otk/style.hh
10 #include "configuration.hh"
19 PixmapMask() { mask
= None
; w
= h
= 0; }
25 enum Type
{ ButtonFocus
, ButtonUnfocus
, TitleFocus
, TitleUnfocus
,
26 LabelFocus
, LabelUnfocus
, HandleFocus
, HandleUnfocus
,
27 GripFocus
, GripUnfocus
};
29 enum TextJustify
{ LeftJustify
= 1, RightJustify
, CenterJustify
};
30 enum BulletType
{ RoundBullet
= 1, TriangleBullet
, SquareBullet
, NoBullet
};
34 BImageControl
*image_control
;
37 l_text_focus
, l_text_unfocus
,
38 b_pic_focus
, b_pic_unfocus
;
50 b_pressed_focus
, b_pressed_unfocus
,
53 PixmapMask close_button
, max_button
, icon_button
, stick_button
;
55 BulletType bullet_type
;
57 unsigned int handle_width
, bevel_width
, frame_width
, border_width
;
59 unsigned int screen_number
;
61 bool shadow_fonts
, aa_fonts
;
66 Style(BImageControl
*);
69 void readDatabaseMask(const std::string
&rname
,
70 PixmapMask
&pixmapMask
,
71 const Configuration
&style
);
73 BTexture
readDatabaseTexture(const std::string
&rname
,
74 const std::string
&default_color
,
75 const Configuration
&style
,
76 bool allowNoTexture
= false);
78 BColor
readDatabaseColor(const std::string
&rname
,
79 const std::string
&default_color
,
80 const Configuration
&style
);
82 BFont
*readDatabaseFont(const std::string
&rbasename
,
83 const Configuration
&style
);
85 void load(const Configuration
&style
);
87 inline PixmapMask
*getCloseButtonMask(void) { return &close_button
; }
88 inline PixmapMask
*getMaximizeButtonMask(void) { return &max_button
; }
89 inline PixmapMask
*getIconifyButtonMask(void) { return &icon_button
; }
90 inline PixmapMask
*getStickyButtonMask(void) { return &stick_button
; }
92 inline BColor
*getTextFocus(void) { return &l_text_focus
; }
93 inline BColor
*getTextUnfocus(void) { return &l_text_unfocus
; }
95 inline BColor
*getButtonPicFocus(void) { return &b_pic_focus
; }
96 inline BColor
*getButtonPicUnfocus(void) { return &b_pic_unfocus
; }
98 inline BTexture
*getTitleFocus(void) { return &t_focus
; }
99 inline BTexture
*getTitleUnfocus(void) { return &t_unfocus
; }
101 inline BTexture
*getLabelFocus(void) { return &l_focus
; }
102 inline BTexture
*getLabelUnfocus(void) { return &l_unfocus
; }
104 inline BTexture
*getHandleFocus(void) { return &h_focus
; }
105 inline BTexture
*getHandleUnfocus(void) { return &h_unfocus
; }
107 inline BTexture
*getButtonFocus(void) { return &b_focus
; }
108 inline BTexture
*getButtonUnfocus(void) { return &b_unfocus
; }
110 inline BTexture
*getButtonPressedFocus(void)
111 { return &b_pressed_focus
; }
112 inline BTexture
*getButtonPressedUnfocus(void)
113 { return &b_pressed_unfocus
; }
115 inline BTexture
*getGripFocus(void) { return &g_focus
; }
116 inline BTexture
*getGripUnfocus(void) { return &g_unfocus
; }
118 inline unsigned int getHandleWidth(void) const { return handle_width
; }
119 inline unsigned int getBevelWidth(void) const { return bevel_width
; }
120 inline unsigned int getFrameWidth(void) const { return frame_width
; }
121 inline unsigned int getBorderWidth(void) const { return border_width
; }
123 inline const BFont
*getFont() const { return font
; }
125 inline void setShadowFonts(bool fonts
) { shadow_fonts
= fonts
; }
126 inline bool hasShadowFonts(void) const { return shadow_fonts
; }
128 inline void setAAFonts(bool fonts
) { aa_fonts
= fonts
; }
129 inline bool hasAAFonts(void) const { return aa_fonts
; }
131 inline TextJustify
textJustify(void) { return justify
; }
132 inline BulletType
bulletType(void) { return bullet_type
; }
134 inline const BColor
*getBorderColor() const { return &border_color
; }
136 inline const BTexture
*getFrameFocus() const { return &f_focus
; }
137 inline const BTexture
*getFrameUnfocus() const { return &f_unfocus
; }
139 inline void setImageControl(BImageControl
*c
) {
141 screen_number
= c
->getScreenInfo()->screen();
143 inline unsigned int getScreen(void) { return screen_number
; }
145 // XXX add inline accessors for the rest of the bummy
This page took 0.038322 seconds and 4 git commands to generate.