X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fstyle.hh;h=2944339dddcd4cdc11f74f79d369e0ec7447e652;hb=a2de94e91e1c0e7775c97745ae11d14e5c5f5659;hp=4128d93ef7f549c1dec3d3c18ccd611810394d92;hpb=0cb338e00d0af4a8b84012e491d464084bc58493;p=chaz%2Fopenbox diff --git a/otk/style.hh b/otk/style.hh index 4128d93e..2944339d 100644 --- a/otk/style.hh +++ b/otk/style.hh @@ -13,6 +13,12 @@ namespace otk { +struct PixmapMask { + Pixmap mask; + unsigned int w, h; + PixmapMask() { mask = None; w = h = 0; } +}; + class Style { public: @@ -23,11 +29,6 @@ public: enum TextJustify { LeftJustify = 1, RightJustify, CenterJustify }; enum BulletType { RoundBullet = 1, TriangleBullet, SquareBullet, NoBullet }; - struct PixmapMask { - Pixmap mask; - unsigned int w, h; - }; - // private: BImageControl *image_control; @@ -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; @@ -65,9 +66,6 @@ public: Style(BImageControl *); ~Style(); - void doJustify(const std::string &text, int &start_pos, - unsigned int max_length, unsigned int modifier) const; - void readDatabaseMask(const std::string &rname, PixmapMask &pixmapMask, const Configuration &style); @@ -86,7 +84,10 @@ public: void load(const Configuration &style); - inline BColor *getBorderColor(void) { return &border_color; } + 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; } @@ -94,9 +95,6 @@ public: inline BColor *getButtonPicFocus(void) { return &b_pic_focus; } inline BColor *getButtonPicUnfocus(void) { return &b_pic_unfocus; } - inline BTexture *getFrameFocus(void) { return &f_focus; } - inline BTexture *getFrameUnfocus(void) { return &f_unfocus; } - inline BTexture *getTitleFocus(void) { return &t_focus; } inline BTexture *getTitleUnfocus(void) { return &t_unfocus; } @@ -110,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; } @@ -122,20 +120,25 @@ 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; } + + inline void setAAFonts(bool fonts) { aa_fonts = fonts; } inline bool hasAAFonts(void) const { return aa_fonts; } 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; - screen_number = c->getScreenInfo()->getScreenNumber(); + screen_number = c->getScreenInfo()->screen(); } inline unsigned int getScreen(void) { return screen_number; }