diff options
author | fluxgen <fluxgen> | 2003-11-28 22:53:10 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2003-11-28 22:53:10 (GMT) |
commit | 139792c8603a4ec6faa23576ff03d39a50d4ab91 (patch) | |
tree | d998d37381081530b06b98a150c00c275a896dc9 /src | |
parent | f6fa2664931d7577780c22eb5a2e738f322ec360 (diff) | |
download | fluxbox_pavel-139792c8603a4ec6faa23576ff03d39a50d4ab91.zip fluxbox_pavel-139792c8603a4ec6faa23576ff03d39a50d4ab91.tar.bz2 |
GContext
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/Menu.cc | 16 | ||||
-rw-r--r-- | src/FbTk/MenuTheme.hh | 17 |
2 files changed, 19 insertions, 14 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 8b4ddd2..96e8fa8 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -22,7 +22,7 @@ | |||
22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
23 | // DEALINGS IN THE SOFTWARE. | 23 | // DEALINGS IN THE SOFTWARE. |
24 | 24 | ||
25 | // $Id: Menu.cc,v 1.41 2003/11/19 12:57:27 rathnor Exp $ | 25 | // $Id: Menu.cc,v 1.42 2003/11/28 22:52:20 fluxgen Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -785,9 +785,9 @@ void Menu::drawItem(unsigned int index, bool highlight, bool clear, bool render_ | |||
785 | } | 785 | } |
786 | 786 | ||
787 | GC gc = | 787 | GC gc = |
788 | ((highlight || item->isSelected()) ? m_theme.hiliteTextGC() : | 788 | ((highlight || item->isSelected()) ? m_theme.hiliteTextGC().gc() : |
789 | m_theme.frameTextGC()); | 789 | m_theme.frameTextGC().gc()); |
790 | GC tgc = | 790 | const GContext &tgc = |
791 | (highlight ? m_theme.hiliteTextGC() : | 791 | (highlight ? m_theme.hiliteTextGC() : |
792 | (item->isEnabled() ? m_theme.frameTextGC() : m_theme.disableTextGC() ) ); | 792 | (item->isEnabled() ? m_theme.frameTextGC() : m_theme.disableTextGC() ) ); |
793 | 793 | ||
@@ -842,11 +842,11 @@ void Menu::drawItem(unsigned int index, bool highlight, bool clear, bool render_ | |||
842 | if (dohilite && highlight && (menu.hilite_pixmap != ParentRelative)) { | 842 | if (dohilite && highlight && (menu.hilite_pixmap != ParentRelative)) { |
843 | if (menu.hilite_pixmap) { | 843 | if (menu.hilite_pixmap) { |
844 | m_frame_pm.copyArea(menu.hilite_pixmap, | 844 | m_frame_pm.copyArea(menu.hilite_pixmap, |
845 | m_theme.hiliteGC(), hoff_x, hoff_y, | 845 | m_theme.hiliteGC().gc(), hoff_x, hoff_y, |
846 | hilite_x, hilite_y, | 846 | hilite_x, hilite_y, |
847 | hilite_w, hilite_h); | 847 | hilite_w, hilite_h); |
848 | } else { | 848 | } else { |
849 | m_frame_pm.fillRectangle(m_theme.hiliteGC(), | 849 | m_frame_pm.fillRectangle(m_theme.hiliteGC().gc(), |
850 | hilite_x, hilite_y, hilite_w, hilite_h); | 850 | hilite_x, hilite_y, hilite_w, hilite_h); |
851 | } | 851 | } |
852 | 852 | ||
@@ -876,12 +876,12 @@ void Menu::drawItem(unsigned int index, bool highlight, bool clear, bool render_ | |||
876 | } else { | 876 | } else { |
877 | if (menu.sel_pixmap) { | 877 | if (menu.sel_pixmap) { |
878 | m_frame_pm.copyArea(highlight ? menu.frame_pixmap : menu.sel_pixmap, | 878 | m_frame_pm.copyArea(highlight ? menu.frame_pixmap : menu.sel_pixmap, |
879 | m_theme.hiliteGC(), | 879 | m_theme.hiliteGC().gc(), |
880 | 0, 0, | 880 | 0, 0, |
881 | sel_x, sel_y, | 881 | sel_x, sel_y, |
882 | half_w, half_w); | 882 | half_w, half_w); |
883 | } else { | 883 | } else { |
884 | m_frame_pm.fillRectangle(m_theme.hiliteGC(), | 884 | m_frame_pm.fillRectangle(m_theme.hiliteGC().gc(), |
885 | sel_x, sel_y, half_w, half_w); | 885 | sel_x, sel_y, half_w, half_w); |
886 | } | 886 | } |
887 | } | 887 | } |
diff --git a/src/FbTk/MenuTheme.hh b/src/FbTk/MenuTheme.hh index e81a2f2..4e9deb3 100644 --- a/src/FbTk/MenuTheme.hh +++ b/src/FbTk/MenuTheme.hh | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: MenuTheme.hh,v 1.9 2003/09/12 23:32:02 fluxgen Exp $ | 22 | // $Id: MenuTheme.hh,v 1.10 2003/11/28 22:53:10 fluxgen Exp $ |
23 | 23 | ||
24 | #ifndef FBTK_MENUTHEME_HH | 24 | #ifndef FBTK_MENUTHEME_HH |
25 | #define FBTK_MENUTHEME_HH | 25 | #define FBTK_MENUTHEME_HH |
@@ -83,11 +83,16 @@ public: | |||
83 | @name graphic contexts | 83 | @name graphic contexts |
84 | */ | 84 | */ |
85 | ///@{ | 85 | ///@{ |
86 | GC titleTextGC() const { return t_text_gc.gc(); } | 86 | const GContext &titleTextGC() const { return t_text_gc; } |
87 | GC frameTextGC() const { return f_text_gc.gc(); } | 87 | const GContext &frameTextGC() const { return f_text_gc; } |
88 | GC hiliteTextGC() const { return h_text_gc.gc(); } | 88 | const GContext &hiliteTextGC() const { return h_text_gc; } |
89 | GC disableTextGC() const { return d_text_gc.gc(); } | 89 | const GContext &disableTextGC() const { return d_text_gc; } |
90 | GC hiliteGC() const { return hilite_gc.gc(); } | 90 | const GContext &hiliteGC() const { return hilite_gc; } |
91 | GContext &titleTextGC() { return t_text_gc; } | ||
92 | GContext &frameTextGC() { return f_text_gc; } | ||
93 | GContext &hiliteTextGC() { return h_text_gc; } | ||
94 | GContext &disableTextGC() { return d_text_gc; } | ||
95 | GContext &hiliteGC() { return hilite_gc; } | ||
91 | ///@} | 96 | ///@} |
92 | BulletType bullet() const { return *m_bullet; } | 97 | BulletType bullet() const { return *m_bullet; } |
93 | FbTk::Justify bulletPos() const { return *bullet_pos; } | 98 | FbTk::Justify bulletPos() const { return *bullet_pos; } |