news download themes documentation links










FbWinFrameTheme.hh

00001 // FbWinFrameTheme.hh for Fluxbox Window Manager
00002 // Copyright (c) 2003-2004 Henrik Kinnunen (fluxgen at users.sourceforge.net)
00003 //
00004 // Permission is hereby granted, free of charge, to any person obtaining a
00005 // copy of this software and associated documentation files (the "Software"),
00006 // to deal in the Software without restriction, including without limitation
00007 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00008 // and/or sell copies of the Software, and to permit persons to whom the
00009 // Software is furnished to do so, subject to the following conditions:
00010 //
00011 // The above copyright notice and this permission notice shall be included in
00012 // all copies or substantial portions of the Software.
00013 //
00014 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
00017 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00018 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00019 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00020 // DEALINGS IN THE SOFTWARE.
00021 
00022 // $Id: FbWinFrameTheme.hh,v 1.15 2004/01/11 16:13:09 fluxgen Exp $
00023 
00024 #ifndef FBWINFRAMETHEME_HH
00025 #define FBWINFRAMETHEME_HH
00026 
00027 #include "FbTk/Font.hh"
00028 #include "FbTk/Texture.hh"
00029 #include "FbTk/Text.hh"
00030 #include "FbTk/Color.hh"
00031 #include "FbTk/Theme.hh"
00032 #include "FbTk/Subject.hh"
00033 #include "FbTk/GContext.hh"
00034 
00035 #include "BorderTheme.hh"
00036 #include "Shape.hh"
00037 
00038 class FbWinFrameTheme: public FbTk::Theme {
00039 public:
00040     explicit FbWinFrameTheme(int screen_num);
00041     ~FbWinFrameTheme();
00046     const FbTk::Texture &labelFocusTexture() const { return *m_label_focus; }
00047     const FbTk::Texture &labelUnfocusTexture() const { return *m_label_unfocus; }
00048     const FbTk::Texture &labelActiveTexture() const { return *m_label_active; }
00049     const FbTk::ThemeItem<FbTk::Texture> &label() const { return m_label_unfocus; }
00050     const FbTk::Texture &titleFocusTexture() const { return *m_title_focus; }
00051     const FbTk::Texture &titleUnfocusTexture() const { return *m_title_unfocus; }
00052 
00053     const FbTk::Texture &handleFocusTexture() const { return *m_handle_focus; }
00054     const FbTk::Texture &handleUnfocusTexture() const { return *m_handle_unfocus; }
00055 
00056     const FbTk::Texture &buttonFocusTexture() const { return *m_button_focus; }
00057     const FbTk::Texture &buttonUnfocusTexture() const { return *m_button_unfocus; }
00058     const FbTk::Texture &buttonPressedTexture() const { return *m_button_pressed; }    
00059 
00060     const FbTk::Texture &gripFocusTexture() const { return *m_grip_focus; }
00061     const FbTk::Texture &gripUnfocusTexture() const { return *m_grip_unfocus; }
00063 
00068     const FbTk::Color &labelFocusColor() const { return *m_label_focus_color; }
00069     const FbTk::Color &labelUnfocusColor() const { return *m_label_unfocus_color; }
00070     const FbTk::Color &labelActiveColor() const { return *m_label_active_color; }
00071 
00072     const FbTk::Color &buttonFocuscolor() const { return *m_button_focus_color; }
00073     const FbTk::Color &buttonUnfocuscolor() const { return *m_button_unfocus_color; }
00075     const FbTk::Font &font() const {  return *m_font; }
00076     FbTk::Font &font() { return *m_font; }
00077 
00078     FbTk::Justify justify() const { return *m_textjustify; }
00079 
00080     GC labelTextFocusGC() const { return m_label_text_focus_gc.gc(); }
00081     GC labelTextUnfocusGC() const { return m_label_text_unfocus_gc.gc(); }
00082     GC labelTextActiveGC() const { return m_label_text_active_gc.gc(); }
00083     GC buttonPicFocusGC() const { return m_button_pic_focus_gc.gc(); }
00084     GC buttonPicUnfocusGC() const { return m_button_pic_unfocus_gc.gc(); }
00085 
00086     bool fallback(FbTk::ThemeItem_base &item);
00087     void reconfigTheme();
00088 
00089     inline Cursor moveCursor() const { return m_cursor_move; }
00090     inline Cursor lowerLeftAngleCursor() const { return m_cursor_lower_left_angle; }
00091     inline Cursor lowerRightAngleCursor() const { return m_cursor_lower_right_angle; }
00092     inline Cursor upperLeftAngleCursor() const { return m_cursor_upper_left_angle; }
00093     inline Cursor upperRightAngleCursor() const { return m_cursor_upper_right_angle; }
00094 
00095     inline Shape::ShapePlace shapePlace() const { return *m_shape_place; }
00096     inline const BorderTheme &border() const { return m_border; }
00097     unsigned char alpha() const { return *m_alpha; }
00098 
00099     unsigned int titleHeight() const { return *m_title_height; }
00100     unsigned int bevelWidth() const { return *m_bevel_width; }
00101     unsigned int handleWidth() const { return *m_handle_width; }
00102 
00103 private:
00104     FbTk::ThemeItem<FbTk::Texture> m_label_focus, m_label_unfocus, m_label_active;
00105     FbTk::ThemeItem<FbTk::Texture> m_title_focus, m_title_unfocus;
00106     FbTk::ThemeItem<FbTk::Texture> m_handle_focus, m_handle_unfocus;
00107     FbTk::ThemeItem<FbTk::Texture> m_button_focus, m_button_unfocus, m_button_pressed;
00108     FbTk::ThemeItem<FbTk::Texture> m_grip_focus, m_grip_unfocus;
00109 
00110     FbTk::ThemeItem<FbTk::Color> m_label_focus_color, m_label_unfocus_color, m_label_active_color;
00111     FbTk::ThemeItem<FbTk::Color> m_button_focus_color, m_button_unfocus_color;
00112     
00113     FbTk::ThemeItem<FbTk::Font> m_font;
00114     FbTk::ThemeItem<FbTk::Justify> m_textjustify;
00115     FbTk::ThemeItem<Shape::ShapePlace> m_shape_place;
00116 
00117     FbTk::ThemeItem<int> m_alpha, m_title_height, m_bevel_width, m_handle_width;
00118     BorderTheme m_border;
00119 
00120     FbTk::GContext m_label_text_focus_gc, m_label_text_unfocus_gc, m_label_text_active_gc;
00121     FbTk::GContext m_button_pic_focus_gc, m_button_pic_unfocus_gc;
00122 
00123     Cursor m_cursor_move;
00124     Cursor m_cursor_lower_left_angle;
00125     Cursor m_cursor_lower_right_angle;
00126     Cursor m_cursor_upper_left_angle;
00127     Cursor m_cursor_upper_right_angle;
00128 };
00129 
00130 #endif // FBWINFRAMETHEME_HH
00131 
00132 

Fluxbox CVS-Jan-2003




      



Got comments about the page? Send them to webmaster.
If you have general Fluxbox related questions ask them on our irc channel or mailing lists.

Show Source








Designed by aLEczapKA