]> Dogcows Code - chaz/openbox/blobdiff - otk/style.hh
in synch mode, chew up 100% cpu, cuz we cant select on the display's fd
[chaz/openbox] / otk / style.hh
index ec9f3f8d4263a40cb23d7e5a8b9b52ded00622fc..2944339dddcd4cdc11f74f79d369e0ec7447e652 100644 (file)
@@ -16,6 +16,7 @@ namespace otk {
 struct PixmapMask {
   Pixmap mask;
   unsigned int w, h;
+  PixmapMask() { mask = None; w = h = 0; }
 };
 
 class Style {
@@ -46,7 +47,7 @@ public:
     l_focus, l_unfocus,
     h_focus, h_unfocus,
     b_focus, b_unfocus,
-    b_pressed, b_pressed_focus, b_pressed_unfocus,
+    b_pressed_focus, b_pressed_unfocus,
     g_focus, g_unfocus;
 
   PixmapMask close_button, max_button, icon_button, stick_button;
@@ -83,6 +84,11 @@ public:
 
   void load(const Configuration &style);
 
+  inline PixmapMask *getCloseButtonMask(void) { return &close_button; }
+  inline PixmapMask *getMaximizeButtonMask(void) { return &max_button; }
+  inline PixmapMask *getIconifyButtonMask(void) { return &icon_button; }
+  inline PixmapMask *getStickyButtonMask(void) { return &stick_button; }
+
   inline BColor *getTextFocus(void) { return &l_text_focus; }
   inline BColor *getTextUnfocus(void) { return &l_text_unfocus; }
 
@@ -102,7 +108,7 @@ public:
   inline BTexture *getButtonUnfocus(void) { return &b_unfocus; }
 
   inline BTexture *getButtonPressedFocus(void)
-  { return &b_pressed; }
+  { return &b_pressed_focus; }
   inline BTexture *getButtonPressedUnfocus(void)
   { return &b_pressed_unfocus; }
 
@@ -114,7 +120,7 @@ public:
   inline unsigned int getFrameWidth(void) const { return frame_width; }
   inline unsigned int getBorderWidth(void) const { return border_width; }
 
-  inline const BFont &getFont() const { return *font; }
+  inline const BFont *getFont() const { return font; }
 
   inline void setShadowFonts(bool fonts) { shadow_fonts = fonts; }
   inline bool hasShadowFonts(void) const { return shadow_fonts; }
@@ -125,10 +131,10 @@ public:
   inline TextJustify textJustify(void) { return justify; }
   inline BulletType bulletType(void) { return bullet_type; }
 
-  inline const BColor &getBorderColor() const { return border_color; }
+  inline const BColor *getBorderColor() const { return &border_color; }
 
-  inline const BTexture &getFrameFocus() const { return f_focus; }
-  inline const BTexture &getFrameUnfocus() const { return f_unfocus; }
+  inline const BTexture *getFrameFocus() const { return &f_focus; }
+  inline const BTexture *getFrameUnfocus() const { return &f_unfocus; }
 
   inline void setImageControl(BImageControl *c) {
     image_control = c;
This page took 0.024242 seconds and 4 git commands to generate.