]>
Dogcows Code - chaz/openbox/blob - otk/style.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
11 #include "configuration.hh"
20 PixmapMask() { mask
= None
; w
= h
= 0; }
26 enum Type
{ ButtonFocus
, ButtonUnfocus
, TitleFocus
, TitleUnfocus
,
27 LabelFocus
, LabelUnfocus
, HandleFocus
, HandleUnfocus
,
28 GripFocus
, GripUnfocus
};
30 enum TextJustify
{ LeftJustify
= 1, RightJustify
, CenterJustify
};
31 enum BulletType
{ RoundBullet
= 1, TriangleBullet
, SquareBullet
, NoBullet
};
35 ImageControl
*image_control
;
38 l_text_focus
, l_text_unfocus
,
39 b_pic_focus
, b_pic_unfocus
;
51 b_pressed_focus
, b_pressed_unfocus
,
54 PixmapMask close_button
, max_button
, icon_button
, stick_button
;
56 BulletType bullet_type
;
58 unsigned int handle_width
, bevel_width
, frame_width
, border_width
;
60 unsigned int screen_number
;
62 bool shadow_fonts
, aa_fonts
;
67 Style(ImageControl
*);
70 void readDatabaseMask(const std::string
&rname
,
71 PixmapMask
&pixmapMask
,
72 const Configuration
&style
);
74 Texture
readDatabaseTexture(const std::string
&rname
,
75 const std::string
&default_color
,
76 const Configuration
&style
,
77 bool allowNoTexture
= false);
79 Color
readDatabaseColor(const std::string
&rname
,
80 const std::string
&default_color
,
81 const Configuration
&style
);
83 Font
*readDatabaseFont(const std::string
&rbasename
,
84 const Configuration
&style
);
86 void load(const Configuration
&style
);
88 inline PixmapMask
*getCloseButtonMask(void) { return &close_button
; }
89 inline PixmapMask
*getMaximizeButtonMask(void) { return &max_button
; }
90 inline PixmapMask
*getIconifyButtonMask(void) { return &icon_button
; }
91 inline PixmapMask
*getStickyButtonMask(void) { return &stick_button
; }
93 inline Color
*getTextFocus(void) { return &l_text_focus
; }
94 inline Color
*getTextUnfocus(void) { return &l_text_unfocus
; }
96 inline Color
*getButtonPicFocus(void) { return &b_pic_focus
; }
97 inline Color
*getButtonPicUnfocus(void) { return &b_pic_unfocus
; }
99 inline Texture
*getTitleFocus(void) { return &t_focus
; }
100 inline Texture
*getTitleUnfocus(void) { return &t_unfocus
; }
102 inline Texture
*getLabelFocus(void) { return &l_focus
; }
103 inline Texture
*getLabelUnfocus(void) { return &l_unfocus
; }
105 inline Texture
*getHandleFocus(void) { return &h_focus
; }
106 inline Texture
*getHandleUnfocus(void) { return &h_unfocus
; }
108 inline Texture
*getButtonFocus(void) { return &b_focus
; }
109 inline Texture
*getButtonUnfocus(void) { return &b_unfocus
; }
111 inline Texture
*getButtonPressedFocus(void)
112 { return &b_pressed_focus
; }
113 inline Texture
*getButtonPressedUnfocus(void)
114 { return &b_pressed_unfocus
; }
116 inline Texture
*getGripFocus(void) { return &g_focus
; }
117 inline Texture
*getGripUnfocus(void) { return &g_unfocus
; }
119 inline unsigned int getHandleWidth(void) const { return handle_width
; }
120 inline unsigned int getBevelWidth(void) const { return bevel_width
; }
121 inline unsigned int getFrameWidth(void) const { return frame_width
; }
122 inline unsigned int getBorderWidth(void) const { return border_width
; }
124 inline const Font
*getFont() const { return font
; }
126 inline void setShadowFonts(bool fonts
) { shadow_fonts
= fonts
; }
127 inline bool hasShadowFonts(void) const { return shadow_fonts
; }
129 inline void setAAFonts(bool fonts
) { aa_fonts
= fonts
; }
130 inline bool hasAAFonts(void) const { return aa_fonts
; }
132 inline TextJustify
textJustify(void) { return justify
; }
133 inline BulletType
bulletType(void) { return bullet_type
; }
135 inline const Color
*getBorderColor() const { return &border_color
; }
137 inline const Texture
*getFrameFocus() const { return &f_focus
; }
138 inline const Texture
*getFrameUnfocus() const { return &f_unfocus
; }
140 inline void setImageControl(ImageControl
*c
) {
142 screen_number
= c
->getScreenInfo()->screen();
144 inline unsigned int getScreen(void) { return screen_number
; }
146 // XXX add inline accessors for the rest of the bummy
This page took 0.044846 seconds and 4 git commands to generate.