GContext
This commit is contained in:
parent
f6fa266493
commit
139792c860
2 changed files with 19 additions and 14 deletions
|
@ -22,7 +22,7 @@
|
|||
// 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 @@ void Menu::drawItem(unsigned int index, bool highlight, bool clear, bool render_
|
|||
}
|
||||
|
||||
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 @@ void Menu::drawItem(unsigned int index, bool highlight, bool clear, bool render_
|
|||
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 @@ void Menu::drawItem(unsigned int index, bool highlight, bool clear, bool render_
|
|||
} 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
// 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 @@ public:
|
|||
@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; }
|
||||
|
|
Loading…
Reference in a new issue