]>
Dogcows Code - chaz/openbox/blob - otk/style.hh
10 #include "configuration.hh"
19 enum Type
{ ButtonFocus
, ButtonUnfocus
, TitleFocus
, TitleUnfocus
,
20 LabelFocus
, LabelUnfocus
, HandleFocus
, HandleUnfocus
,
21 GripFocus
, GripUnfocus
};
23 enum TextJustify
{ LeftJustify
= 1, RightJustify
, CenterJustify
};
24 enum BulletType
{ RoundBullet
= 1, TriangleBullet
, SquareBullet
, NoBullet
};
33 BImageControl
*image_control
;
36 l_text_focus
, l_text_unfocus
,
37 b_pic_focus
, b_pic_unfocus
;
49 b_pressed
, b_pressed_focus
, b_pressed_unfocus
,
52 PixmapMask close_button
, max_button
, icon_button
, stick_button
;
54 BulletType bullet_type
;
56 unsigned int handle_width
, bevel_width
, frame_width
, border_width
;
58 unsigned int screen_number
;
60 bool shadow_fonts
, aa_fonts
;
65 Style(BImageControl
*);
68 void doJustify(const std::string
&text
, int &start_pos
,
69 unsigned int max_length
, unsigned int modifier
) const;
71 void readDatabaseMask(const std::string
&rname
,
72 PixmapMask
&pixmapMask
,
73 const Configuration
&style
);
75 BTexture
readDatabaseTexture(const std::string
&rname
,
76 const std::string
&default_color
,
77 const Configuration
&style
,
78 bool allowNoTexture
= false);
80 BColor
readDatabaseColor(const std::string
&rname
,
81 const std::string
&default_color
,
82 const Configuration
&style
);
84 BFont
*readDatabaseFont(const std::string
&rbasename
,
85 const Configuration
&style
);
87 void load(const Configuration
&style
);
89 inline BColor
*getBorderColor(void) { return &border_color
; }
91 inline BColor
*getTextFocus(void) { return &l_text_focus
; }
92 inline BColor
*getTextUnfocus(void) { return &l_text_unfocus
; }
94 inline BColor
*getButtonPicFocus(void) { return &b_pic_focus
; }
95 inline BColor
*getButtonPicUnfocus(void) { return &b_pic_unfocus
; }
97 inline BTexture
*getFrameFocus(void) { return &f_focus
; }
98 inline BTexture
*getFrameUnfocus(void) { return &f_unfocus
; }
100 inline BTexture
*getTitleFocus(void) { return &t_focus
; }
101 inline BTexture
*getTitleUnfocus(void) { return &t_unfocus
; }
103 inline BTexture
*getLabelFocus(void) { return &l_focus
; }
104 inline BTexture
*getLabelUnfocus(void) { return &l_unfocus
; }
106 inline BTexture
*getHandleFocus(void) { return &h_focus
; }
107 inline BTexture
*getHandleUnfocus(void) { return &h_unfocus
; }
109 inline BTexture
*getButtonFocus(void) { return &b_focus
; }
110 inline BTexture
*getButtonUnfocus(void) { return &b_unfocus
; }
112 inline BTexture
*getButtonPressedFocus(void)
113 { return &b_pressed_focus
; }
114 inline BTexture
*getButtonPressedUnfocus(void)
115 { return &b_pressed_unfocus
; }
117 inline BTexture
*getGripFocus(void) { return &g_focus
; }
118 inline BTexture
*getGripUnfocus(void) { return &g_unfocus
; }
120 inline unsigned int getHandleWidth(void) const { return handle_width
; }
121 inline unsigned int getBevelWidth(void) const { return bevel_width
; }
122 inline unsigned int getFrameWidth(void) const { return frame_width
; }
123 inline unsigned int getBorderWidth(void) const { return border_width
; }
125 inline const BFont
&getFont() const { return *font
; }
126 inline bool hasAAFonts(void) const { return aa_fonts
; }
128 inline TextJustify
textJustify(void) { return justify
; }
129 inline BulletType
bulletType(void) { return bullet_type
; }
131 inline const BColor
&getBorderColor() const { return border_color
; }
133 inline const BTexture
&getFrameFocus() const { return f_focus
; }
134 inline const BTexture
&getFrameUnfocus() const { return f_unfocus
; }
136 inline void setImageControl(BImageControl
*c
) {
138 screen_number
= c
->getScreenInfo()->getScreenNumber();
140 inline unsigned int getScreen(void) { return screen_number
; }
142 // XXX add inline accessors for the rest of the bummy
This page took 0.044043 seconds and 4 git commands to generate.