all repos — fluxbox @ 139792c8603a4ec6faa23576ff03d39a50d4ab91

custom fork of the fluxbox windowmanager

GContext
fluxgen fluxgen
commit

139792c8603a4ec6faa23576ff03d39a50d4ab91

parent

f6fa2664931d7577780c22eb5a2e738f322ec360

2 files changed, 19 insertions(+), 14 deletions(-)

jump to
M src/FbTk/Menu.ccsrc/FbTk/Menu.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Menu.cc,v 1.41 2003/11/19 12:57:27 rathnor Exp $ +// $Id: Menu.cc,v 1.42 2003/11/28 22:52:20 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE

@@ -785,9 +785,9 @@ text_h = menu.item_h - menu.bevel_w;

} GC gc = - ((highlight || item->isSelected()) ? m_theme.hiliteTextGC() : - m_theme.frameTextGC()); - GC tgc = + ((highlight || item->isSelected()) ? m_theme.hiliteTextGC().gc() : + m_theme.frameTextGC().gc()); + const GContext &tgc = (highlight ? m_theme.hiliteTextGC() : (item->isEnabled() ? m_theme.frameTextGC() : m_theme.disableTextGC() ) );

@@ -842,11 +842,11 @@

if (dohilite && highlight && (menu.hilite_pixmap != ParentRelative)) { if (menu.hilite_pixmap) { m_frame_pm.copyArea(menu.hilite_pixmap, - m_theme.hiliteGC(), hoff_x, hoff_y, + m_theme.hiliteGC().gc(), hoff_x, hoff_y, hilite_x, hilite_y, hilite_w, hilite_h); } else { - m_frame_pm.fillRectangle(m_theme.hiliteGC(), + m_frame_pm.fillRectangle(m_theme.hiliteGC().gc(), hilite_x, hilite_y, hilite_w, hilite_h); }

@@ -876,12 +876,12 @@ None);

} else { if (menu.sel_pixmap) { m_frame_pm.copyArea(highlight ? menu.frame_pixmap : menu.sel_pixmap, - m_theme.hiliteGC(), + m_theme.hiliteGC().gc(), 0, 0, sel_x, sel_y, half_w, half_w); } else { - m_frame_pm.fillRectangle(m_theme.hiliteGC(), + m_frame_pm.fillRectangle(m_theme.hiliteGC().gc(), sel_x, sel_y, half_w, half_w); } }
M src/FbTk/MenuTheme.hhsrc/FbTk/MenuTheme.hh

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MenuTheme.hh,v 1.9 2003/09/12 23:32:02 fluxgen Exp $ +// $Id: MenuTheme.hh,v 1.10 2003/11/28 22:53:10 fluxgen Exp $ #ifndef FBTK_MENUTHEME_HH #define FBTK_MENUTHEME_HH

@@ -83,11 +83,16 @@ /**

@name graphic contexts */ ///@{ - GC titleTextGC() const { return t_text_gc.gc(); } - GC frameTextGC() const { return f_text_gc.gc(); } - GC hiliteTextGC() const { return h_text_gc.gc(); } - GC disableTextGC() const { return d_text_gc.gc(); } - GC hiliteGC() const { return hilite_gc.gc(); } + const GContext &titleTextGC() const { return t_text_gc; } + const GContext &frameTextGC() const { return f_text_gc; } + const GContext &hiliteTextGC() const { return h_text_gc; } + const GContext &disableTextGC() const { return d_text_gc; } + const GContext &hiliteGC() const { return hilite_gc; } + GContext &titleTextGC() { return t_text_gc; } + GContext &frameTextGC() { return f_text_gc; } + GContext &hiliteTextGC() { return h_text_gc; } + GContext &disableTextGC() { return d_text_gc; } + GContext &hiliteGC() { return hilite_gc; } ///@} BulletType bullet() const { return *m_bullet; } FbTk::Justify bulletPos() const { return *bullet_pos; }