|
From: <arn...@us...> - 2008-04-14 20:09:36
|
Revision: 1141
http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=1141&view=rev
Author: arnetheduck
Date: 2008-04-14 13:09:08 -0700 (Mon, 14 Apr 2008)
Log Message:
-----------
menus: fix colors and use the font
Modified Paths:
--------------
dcplusplus/trunk/dwt/include/dwt/widgets/WidgetMenu.h
dcplusplus/trunk/dwt/src/widgets/WidgetMenu.cpp
dcplusplus/trunk/win32/WinUtil.cpp
dcplusplus/trunk/win32/WinUtil.h
Property Changed:
----------------
dcplusplus/trunk/
Property changes on: dcplusplus/trunk
___________________________________________________________________
Name: bzr:revision-info
- timestamp: 2008-04-06 15:41:01.052000046 +0200
committer: poy <po...@12...>
properties:
branch-nick: bzr
+ timestamp: 2008-04-06 17:58:49.723999977 +0200
committer: poy <po...@12...>
properties:
branch-nick: bzr
Name: bzr:revision-id:v3-trunk1
- 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn
1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn
1029 zouzou123gen-20080323221249-0su72zaj13e706mk
1030 arn...@gm...-20080324140623-muba1dl46m000o8c
1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6
1032 arn...@gm...-20080324153706-siidja05n84i00b1
1033 arn...@gm...-20080324153823-lhn3awurnu77riln
1034 arn...@gm...-20080324165650-zapppziji67yf5a2
1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2
1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3
1037 arn...@gm...-20080325100659-8fqy6q65itmghlep
1038 zouzou123gen-20080325175216-s297sdiucukfvijh
1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087
1040 arn...@gm...-20080325211747-nwwy1eb33r071sca
1041 arn...@gm...-20080326084110-qbselrjckku275xi
1042 zouzou123gen-20080326123631-35642mgbk2i4ty32
1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r
1044 arn...@gm...-20080326162031-il0nyms30w0mky43
1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv
1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g
1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv
1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q
1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz
1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf
1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd
1052 arn...@gm...-20080327120639-um3tukdt374rwvgm
1053 zouzou123gen-20080327130703-6vtek6uxy3vua543
1054 arn...@gm...-20080327215831-dmg5mkufskabwkro
1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf
1056 arn...@gm...-20080328085925-gceybsr53oml1p24
1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a
1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o
1059 arn...@gm...-20080329055630-braiir1dskv7a4qm
1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja
1061 arn...@gm...-20080329081253-if6o5jn329mbzfpl
1062 arn...@gm...-20080329081619-cb4x930j8sp55cs0
1063 arn...@gm...-20080329103216-hgjzo7ra2zixbztd
1064 arn...@gm...-20080329124042-q3aw4iodmo5kafyp
1065 arn...@gm...-20080329124926-2je1z18p0272zpua
1066 arn...@gm...-20080329150901-ehj9t32en7eps2dp
1067 zouzou123gen-20080329153653-36xlvpik2ns9r84r
1068 zouzou123gen-20080329162703-51xr8hg073pg7wq5
1069 zouzou123gen-20080329234706-8ddipdqu0xeudkql
1070 arn...@gm...-20080330081232-ubqr1171ewalrd4q
1071 zouzou123gen-20080330131607-yppbs3mgyjef1cux
1072 zouzou123gen-20080330134835-yv1nogy77ib1uehd
1073 zouzou123gen-20080331124549-alyw7vugdn30piqy
1074 zouzou123gen-20080331135108-q8frtqsin5bosfzm
1075 zouzou123gen-20080331140757-u94q52yccl5lsifk
1076 zouzou123gen-20080331152513-ue1x5qhigcw51348
1077 arn...@gm...-20080331184436-a8g6chibmg8nswls
1078 arn...@gm...-20080331220648-81485k28qmwruwz6
1079 zouzou123gen-20080401081001-2yjn07cf8s5sxr3a
1080 zouzou123gen-20080401081247-f3p4hdjojnd460jw
1081 zouzou123gen-20080401084117-24a454g8o0x656kg
1082 zouzou123gen-20080401133146-jabb5i8870fg6f66
1083 zouzou123gen-20080401154610-mxdqoo5bksru93e6
1084 arn...@gm...-20080401185530-lqj4tflt5ldmx46f
1085 arn...@gm...-20080401212616-ffl7m0xm8gt15knk
1086 arn...@gm...-20080402084515-ofmnwihzv159jton
1087 arn...@gm...-20080402133105-y70soi38owzl76i9
1088 arn...@gm...-20080402142417-rn2dbkx19wfz3vae
1089 arn...@gm...-20080402144459-u3z3hqvl8aqjc4a0
1090 zouzou123gen-20080402145051-zi8tmvy8u3r2mzu8
1091 arn...@gm...-20080402152137-f397uz1yp9qjvfwh
1092 zouzou123gen-20080402170355-29wda40wk3cy7lu5
1093 arn...@gm...-20080402180628-ipos9li0c4bsmq1h
1094 arn...@gm...-20080402181235-s2a6f4ww4lzayl46
1095 arn...@gm...-20080402193851-6mu64vgep6tijith
1096 arn...@gm...-20080402203810-86zpxsx69q83zf3r
1097 arn...@gm...-20080402204331-so2e8n892o23pejr
1098 poy-20080402224153-225qylr2cfwhqrg7
1099 mrmikejj-20080403125112-o8polh8rkn62umyh
1100 arn...@gm...-20080403125139-8xub76j1xazhfxna
1101 po...@12...-20080403140544-13kockkjho883nb4
1102 po...@12...-20080403143012-bxghtoodiolugpbs
1103 arn...@gm...-20080403190809-bbi4bz5rfcvjnt20
1104 arn...@gm...-20080403205410-czxru1vcg1s4wcws
1105 arn...@gm...-20080403213124-54spdrwszgyimd90
1106 po...@12...-20080404002406-aj74x5tngi6mmmj1
1107 arn...@gm...-20080404122415-mjy07qzbaxyhagra
1108 po...@12...-20080404145445-84lyk5tyy3b3br14
1109 po...@12...-20080404231417-v4v8x7u3f0hm0ejc
1110 po...@12...-20080405001107-14d1ojjof8xhvcj8
1111 arn...@gm...-20080405071929-jmnrul21sxx04kky
1112 arn...@gm...-20080405080105-9qbda7be0pi7y1ai
1113 po...@12...-20080405154555-yuj2n5kyndfjlpsf
1114 po...@12...-20080405220250-8y09d0samsj8ja94
1115 po...@12...-20080406134101-4860ytb61sbu3yhg
+ 1027 arn...@gm...-20080323183926-schknwnkgeo7ivdn
1028 zouzou123gen-20080323220411-r8usuc3qxwuh7zsn
1029 zouzou123gen-20080323221249-0su72zaj13e706mk
1030 arn...@gm...-20080324140623-muba1dl46m000o8c
1031 zouzou123gen-20080324141933-qbgr93ugpe0297m6
1032 arn...@gm...-20080324153706-siidja05n84i00b1
1033 arn...@gm...-20080324153823-lhn3awurnu77riln
1034 arn...@gm...-20080324165650-zapppziji67yf5a2
1035 zouzou123gen-20080324175936-4mqc2kh0lo5wtdu2
1036 zouzou123gen-20080325004602-6wdsoym95mjuhwd3
1037 arn...@gm...-20080325100659-8fqy6q65itmghlep
1038 zouzou123gen-20080325175216-s297sdiucukfvijh
1039 arn...@gm...-20080325210137-3dfqyoi8ykosy087
1040 arn...@gm...-20080325211747-nwwy1eb33r071sca
1041 arn...@gm...-20080326084110-qbselrjckku275xi
1042 zouzou123gen-20080326123631-35642mgbk2i4ty32
1043 zouzou123gen-20080326124345-f4xwn2d3ty8ubd6r
1044 arn...@gm...-20080326162031-il0nyms30w0mky43
1045 arn...@gm...-20080326164801-8dru8mjc06xgzjpv
1046 arn...@gm...-20080326170438-uzl2rx8fqnohak7g
1047 zouzou123gen-20080326172821-d6uqcbmfb0c6rwlv
1048 arn...@gm...-20080326213257-qlgdh7m2712p2l0q
1049 arn...@gm...-20080326214313-ktnoekgk3s0wmatz
1050 arn...@gm...-20080326215256-0j1iqrf286b9g7zf
1051 arn...@gm...-20080327082121-hoi22wh1gwjdfbyd
1052 arn...@gm...-20080327120639-um3tukdt374rwvgm
1053 zouzou123gen-20080327130703-6vtek6uxy3vua543
1054 arn...@gm...-20080327215831-dmg5mkufskabwkro
1055 arn...@gm...-20080327231459-cdztcv25alsuyqmf
1056 arn...@gm...-20080328085925-gceybsr53oml1p24
1057 arn...@gm...-20080328200512-1sjuu6bcnl2dyd2a
1058 arn...@gm...-20080328210347-bussqjrm5mfswh7o
1059 arn...@gm...-20080329055630-braiir1dskv7a4qm
1060 arn...@gm...-20080329061558-rck8dz60wpj3c5ja
1061 arn...@gm...-20080329081253-if6o5jn329mbzfpl
1062 arn...@gm...-20080329081619-cb4x930j8sp55cs0
1063 arn...@gm...-20080329103216-hgjzo7ra2zixbztd
1064 arn...@gm...-20080329124042-q3aw4iodmo5kafyp
1065 arn...@gm...-20080329124926-2je1z18p0272zpua
1066 arn...@gm...-20080329150901-ehj9t32en7eps2dp
1067 zouzou123gen-20080329153653-36xlvpik2ns9r84r
1068 zouzou123gen-20080329162703-51xr8hg073pg7wq5
1069 zouzou123gen-20080329234706-8ddipdqu0xeudkql
1070 arn...@gm...-20080330081232-ubqr1171ewalrd4q
1071 zouzou123gen-20080330131607-yppbs3mgyjef1cux
1072 zouzou123gen-20080330134835-yv1nogy77ib1uehd
1073 zouzou123gen-20080331124549-alyw7vugdn30piqy
1074 zouzou123gen-20080331135108-q8frtqsin5bosfzm
1075 zouzou123gen-20080331140757-u94q52yccl5lsifk
1076 zouzou123gen-20080331152513-ue1x5qhigcw51348
1077 arn...@gm...-20080331184436-a8g6chibmg8nswls
1078 arn...@gm...-20080331220648-81485k28qmwruwz6
1079 zouzou123gen-20080401081001-2yjn07cf8s5sxr3a
1080 zouzou123gen-20080401081247-f3p4hdjojnd460jw
1081 zouzou123gen-20080401084117-24a454g8o0x656kg
1082 zouzou123gen-20080401133146-jabb5i8870fg6f66
1083 zouzou123gen-20080401154610-mxdqoo5bksru93e6
1084 arn...@gm...-20080401185530-lqj4tflt5ldmx46f
1085 arn...@gm...-20080401212616-ffl7m0xm8gt15knk
1086 arn...@gm...-20080402084515-ofmnwihzv159jton
1087 arn...@gm...-20080402133105-y70soi38owzl76i9
1088 arn...@gm...-20080402142417-rn2dbkx19wfz3vae
1089 arn...@gm...-20080402144459-u3z3hqvl8aqjc4a0
1090 zouzou123gen-20080402145051-zi8tmvy8u3r2mzu8
1091 arn...@gm...-20080402152137-f397uz1yp9qjvfwh
1092 zouzou123gen-20080402170355-29wda40wk3cy7lu5
1093 arn...@gm...-20080402180628-ipos9li0c4bsmq1h
1094 arn...@gm...-20080402181235-s2a6f4ww4lzayl46
1095 arn...@gm...-20080402193851-6mu64vgep6tijith
1096 arn...@gm...-20080402203810-86zpxsx69q83zf3r
1097 arn...@gm...-20080402204331-so2e8n892o23pejr
1098 poy-20080402224153-225qylr2cfwhqrg7
1099 mrmikejj-20080403125112-o8polh8rkn62umyh
1100 arn...@gm...-20080403125139-8xub76j1xazhfxna
1101 po...@12...-20080403140544-13kockkjho883nb4
1102 po...@12...-20080403143012-bxghtoodiolugpbs
1103 arn...@gm...-20080403190809-bbi4bz5rfcvjnt20
1104 arn...@gm...-20080403205410-czxru1vcg1s4wcws
1105 arn...@gm...-20080403213124-54spdrwszgyimd90
1106 po...@12...-20080404002406-aj74x5tngi6mmmj1
1107 arn...@gm...-20080404122415-mjy07qzbaxyhagra
1108 po...@12...-20080404145445-84lyk5tyy3b3br14
1109 po...@12...-20080404231417-v4v8x7u3f0hm0ejc
1110 po...@12...-20080405001107-14d1ojjof8xhvcj8
1111 arn...@gm...-20080405071929-jmnrul21sxx04kky
1112 arn...@gm...-20080405080105-9qbda7be0pi7y1ai
1113 po...@12...-20080405154555-yuj2n5kyndfjlpsf
1114 po...@12...-20080405220250-8y09d0samsj8ja94
1115 po...@12...-20080406134101-4860ytb61sbu3yhg
1116 po...@12...-20080406155849-2wzxzuzs5m8zpk0g
Modified: dcplusplus/trunk/dwt/include/dwt/widgets/WidgetMenu.h
===================================================================
--- dcplusplus/trunk/dwt/include/dwt/widgets/WidgetMenu.h 2008-04-14 20:07:53 UTC (rev 1140)
+++ dcplusplus/trunk/dwt/include/dwt/widgets/WidgetMenu.h 2008-04-14 20:09:08 UTC (rev 1141)
@@ -53,19 +53,14 @@
/// Menu item text color
COLORREF TextColor;
- /// Menu item font
- FontPtr Font;
-
/// Menu item image
BitmapPtr Image;
/// Creates new menu item with specified data
MenuItemData(
- FontPtr font = FontPtr( new dwt::Font( ( HFONT )::GetStockObject( DEFAULT_GUI_FONT ), false ) ),
BitmapPtr image = BitmapPtr( new Bitmap( ( HBITMAP ) NULL ) ), // defaults to empty bitmap
COLORREF textColor = ::GetSysColor( COLOR_MENUTEXT ) )
: TextColor( textColor ),
- Font( font ),
Image( image )
{}
};
@@ -138,10 +133,11 @@
typedef std::tr1::shared_ptr<WidgetMenu> ObjectType;
struct Seed {
- Seed(bool ownerDrawn_ = true, const MenuColorInfo& colorInfo_ = MenuColorInfo()) : popup(true), ownerDrawn(ownerDrawn_), colorInfo(colorInfo_) { }
+ Seed(bool ownerDrawn_ = true, const MenuColorInfo& colorInfo_ = MenuColorInfo(), FontPtr font_ = 0);
bool popup;
bool ownerDrawn;
MenuColorInfo colorInfo;
+ FontPtr font;
};
struct IdDispatcher
@@ -491,6 +487,8 @@
// Contains information about menu colors
MenuColorInfo itsColorInfo;
+ FontPtr font;
+
// Menu title
SmartUtil::tstring itsTitle;
Modified: dcplusplus/trunk/dwt/src/widgets/WidgetMenu.cpp
===================================================================
--- dcplusplus/trunk/dwt/src/widgets/WidgetMenu.cpp 2008-04-14 20:07:53 UTC (rev 1140)
+++ dcplusplus/trunk/dwt/src/widgets/WidgetMenu.cpp 2008-04-14 20:09:08 UTC (rev 1141)
@@ -50,6 +50,14 @@
const int WidgetMenu::minSysMenuItemWidth = 130;
Point WidgetMenu::defaultImageSize = Point( 16, 16 );
+WidgetMenu::Seed::Seed(bool ownerDrawn_, const MenuColorInfo& colorInfo_, FontPtr font_) :
+popup(true),
+ownerDrawn(ownerDrawn_),
+colorInfo(colorInfo_),
+font(font_)
+{
+}
+
WidgetMenu::WidgetMenu( dwt::Widget* parent ) :
isSysMenu(false),
itsChildrenRef(itsChildren),
@@ -66,11 +74,16 @@
itsColorInfo = cs.colorInfo;
if(ownerDrawn) {
+ if(cs.font)
+ font = cs.font;
+ else
+ font = new Font(DefaultGuiFont);
+
{
LOGFONT lf;
- ::GetObject((HFONT)GetStockObject(DEFAULT_GUI_FONT), sizeof(lf), &lf);
+ ::GetObject(font->handle(), sizeof(lf), &lf);
lf.lfWeight = FW_BOLD;
- itsTitleFont = dwt::FontPtr(new dwt::Font(::CreateFontIndirect(&lf), true));
+ itsTitleFont = FontPtr(new Font(::CreateFontIndirect(&lf), true));
}
// set default drawing
@@ -139,7 +152,7 @@
{
// create popup menu pointer
ObjectType retVal ( new WidgetMenu(itsParent) );
- retVal->create( Seed(ownerDrawn, itsColorInfo) );
+ retVal->create( Seed(ownerDrawn, itsColorInfo, font) );
// init structure for new item
MENUITEMINFO info;
@@ -365,8 +378,7 @@
info.dwTypeData = const_cast< LPTSTR >( title.c_str() );
// created info for title item
- MenuItemDataPtr data( new MenuItemData( itsTitleFont ) );
- ItemDataWrapper * wrapper = new ItemDataWrapper( this, 0, data, true );
+ ItemDataWrapper * wrapper = new ItemDataWrapper( this, 0, MenuItemDataPtr( new MenuItemData() ), true );
// set item data
info.dwItemData = reinterpret_cast< ULONG_PTR >( wrapper );
@@ -449,14 +461,9 @@
// setup buffered canvas
BufferedCanvas< FreeCanvas > canvas( reinterpret_cast<HWND>(wrapper->menu->handle()), drawInfo->hDC );
- // this will conain adjusted sidebar width
+ // this will contain adjusted sidebar width
int sidebarWidth = 0;
- // this will contain logical information
- // about title font
- LOGFONT lf;
- memset( & lf, 0, sizeof( LOGFONT ) );
-
// this will contain adjusted(rotated) title font for sidebar
HFONT titleFont = NULL;
@@ -467,7 +474,8 @@
FontPtr font = wrapper->menu->itsTitleFont;
// get logical info for title font
- ::GetObject( font->handle(), sizeof( LOGFONT ), & lf );
+ LOGFONT lf;
+ ::GetObject(font->handle(), sizeof(lf), &lf);
// 90 degree rotation and bold
lf.lfOrientation = lf.lfEscapement = 900;
@@ -511,9 +519,11 @@
// set title rectangle
Rectangle textRectangle( 0, 0, sidebarWidth, rect.bottom - rect.top );
- // draw background
- Brush brush ( colorInfo.colorStrip );
- canvas.fillRectangle( textRectangle, brush );
+ {
+ // draw background
+ Brush brush(colorInfo.colorStrip);
+ canvas.fillRectangle(textRectangle, brush);
+ }
// draw title
textRectangle.pos.y += 10;
@@ -530,41 +540,24 @@
// destroy title font
::DeleteObject( titleFont );
- // set item background
+ bool highlight = (isSelected || isHighlighted) && !isDisabled;
+
{
- Brush brush((wrapper->isMenuTitleItem || isMenuBar) ? colorInfo.colorStrip : colorInfo.colorMenu);
+ // set item background
+ Brush brush(highlight ? colorInfo.colorHighlight : (wrapper->isMenuTitleItem || isMenuBar) ? colorInfo.colorStrip : colorInfo.colorMenu);
canvas.fillRectangle(itemRectangle, brush);
}
- if ( isMenuBar && isSelected ) // draw selected menu bar item
+ if(!highlight && !isMenuBar && !wrapper->isMenuTitleItem) // strip bar (on the left, where bitmaps go)
{
- // TODO: Simulate shadow
-
- // select pen for drawing broder
- // and brush for filling item
- COLORREF colorBorder = 0;
- Canvas::Selector select_pen(canvas, *PenPtr(new Pen(colorBorder)));
- canvas.rectangle( itemRectangle );
- } // end if
- else if ( ( isSelected || isHighlighted ) && !isDisabled ) // draw selected or highlighted menu item (if not inactive)
- {
- // select pen for drawing broder
- // and brush for filling item
- Canvas::Selector select_pen(canvas, *PenPtr(new Pen(colorInfo.colorHighlight)));
- Canvas::Selector select_brush(canvas, *BrushPtr(new Brush(ColorUtilities::lightenColor( colorInfo.colorHighlight, 0.7 ))));
-
- canvas.rectangle( itemRectangle );
- } // end if
- else if ( !isMenuBar && !wrapper->isMenuTitleItem ) // draw strip bar for menu items (except menu title item)
- {
// create rectangle for strip bar
Rectangle stripRectangle ( itemRectangle );
stripRectangle.size.x = stripWidth;
// draw strip bar
- Brush brush ( colorInfo.colorStrip );
- canvas.fillRectangle( stripRectangle, brush );
- } // end if
+ Brush brush(colorInfo.colorStrip);
+ canvas.fillRectangle(stripRectangle, brush);
+ }
if ( !isMenuBar && info.fType & MFT_SEPARATOR ) // draw separator
{
@@ -609,7 +602,10 @@
canvas.setTextColor( isGrayed ? ::GetSysColor( COLOR_GRAYTEXT ) : wrapper->isMenuTitleItem ? colorInfo.colorTitleText : data->TextColor );
// Select item font
- FontPtr font((static_cast<int>(::GetMenuDefaultItem(wrapper->menu->handle(), TRUE, GMDI_USEDISABLED)) == wrapper->index) ? wrapper->menu->itsTitleFont : data->Font);
+ FontPtr font =
+ (wrapper->isMenuTitleItem || (static_cast<int>(::GetMenuDefaultItem(wrapper->menu->handle(), TRUE, GMDI_USEDISABLED)) == wrapper->index))
+ ? wrapper->menu->itsTitleFont
+ : wrapper->menu->font;
HGDIOBJ oldFont = ::SelectObject( canvas.handle(), font->handle() );
@@ -782,7 +778,7 @@
SIZE textSize;
memset( & textSize, 0, sizeof( SIZE ) );
- HGDIOBJ oldFont = ::SelectObject( hdc, data->Font->handle() );
+ HGDIOBJ oldFont = ::SelectObject( hdc, wrapper->menu->font->handle() );
::GetTextExtentPoint32( hdc, itemText.c_str(), ( int ) itemText.size(), & textSize );
::SelectObject( hdc, oldFont );
Modified: dcplusplus/trunk/win32/WinUtil.cpp
===================================================================
--- dcplusplus/trunk/win32/WinUtil.cpp 2008-04-14 20:07:53 UTC (rev 1140)
+++ dcplusplus/trunk/win32/WinUtil.cpp 2008-04-14 20:09:08 UTC (rev 1141)
@@ -61,8 +61,8 @@
const dwt::Button::Seed WinUtil::Seeds::button;
const ComboBox::Seed WinUtil::Seeds::comboBoxStatic;
const ComboBox::Seed WinUtil::Seeds::comboBoxEdit;
+const dwt::WidgetMenu::Seed WinUtil::Seeds::menu;
const dwt::Table::Seed WinUtil::Seeds::Table;
-const dwt::WidgetMenu::Seed WinUtil::Seeds::menu;
const TextBox::Seed WinUtil::Seeds::textBox;
const dwt::Tree::Seed WinUtil::Seeds::treeView;
@@ -123,8 +123,8 @@
dwt::Button::Seed& xbutton = const_cast<dwt::Button::Seed&>(Seeds::button);
ComboBox::Seed& xcomboBoxEdit = const_cast<ComboBox::Seed&>(Seeds::comboBoxEdit);
ComboBox::Seed& xcomboBoxStatic = const_cast<ComboBox::Seed&>(Seeds::comboBoxStatic);
+ dwt::WidgetMenu::Seed& xmenu = const_cast<dwt::WidgetMenu::Seed&>(Seeds::menu);
dwt::Table::Seed& xTable = const_cast<dwt::Table::Seed&>(Seeds::Table);
- dwt::WidgetMenu::Seed& xmenu = const_cast<dwt::WidgetMenu::Seed&>(Seeds::menu);
TextBox::Seed& xtextBox = const_cast<TextBox::Seed&>(Seeds::textBox);
dwt::Tree::Seed& xtreeView = const_cast<dwt::Tree::Seed&>(Seeds::treeView);
@@ -135,17 +135,18 @@
xcomboBoxEdit.style |= CBS_DROPDOWN | CBS_AUTOHSCROLL;
xcomboBoxEdit.font = font;
-
+
+ if(BOOLSETTING(OWNER_DRAWN_MENUS)) {
+ xmenu.colorInfo.colorImageBackground = RGB(255, 0, 255); // DC++ bitmaps use RGB(255, 0, 255) as their background (transparent) color
+ xmenu.font = font;
+ } else
+ xmenu.ownerDrawn = false;
+
xTable.style |= WS_HSCROLL | WS_VSCROLL | LVS_SHOWSELALWAYS | LVS_SHAREIMAGELISTS;
xTable.exStyle = WS_EX_CLIENTEDGE;
xTable.lvStyle = LVS_EX_HEADERDRAGDROP | LVS_EX_FULLROWSELECT | LVS_EX_LABELTIP | LVS_EX_DOUBLEBUFFER;
xTable.font = font;
- if(BOOLSETTING(OWNER_DRAWN_MENUS))
- xmenu.colorInfo.colorImageBackground = RGB(255, 0, 255); // DC++ bitmaps use RGB(255, 0, 255) as their background (transparent) color
- else
- xmenu.ownerDrawn = false;
-
xtextBox.exStyle = WS_EX_CLIENTEDGE;
xtextBox.font = font;
Modified: dcplusplus/trunk/win32/WinUtil.h
===================================================================
--- dcplusplus/trunk/win32/WinUtil.h 2008-04-14 20:07:53 UTC (rev 1140)
+++ dcplusplus/trunk/win32/WinUtil.h 2008-04-14 20:09:08 UTC (rev 1141)
@@ -71,8 +71,8 @@
static const dwt::Button::Seed button;
static const ComboBox::Seed comboBoxStatic;
static const ComboBox::Seed comboBoxEdit;
+ static const dwt::WidgetMenu::Seed menu;
static const dwt::Table::Seed Table;
- static const dwt::WidgetMenu::Seed menu;
static const TextBox::Seed textBox;
static const dwt::Tree::Seed treeView;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|