]> git.saurik.com Git - wxWidgets.git/commitdiff
wxComboBox appearance fixes, looks fine now but doesn't really work under GTK
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Jul 2001 15:07:52 +0000 (15:07 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Jul 2001 15:07:52 +0000 (15:07 +0000)
yet

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

20 files changed:
include/wx/univ/renderer.h
samples/widgets/icons/bmpbtn.xpm
samples/widgets/icons/button.xpm
samples/widgets/icons/checkbox.xpm
samples/widgets/icons/combobox.xpm
samples/widgets/icons/gauge.xpm
samples/widgets/icons/listbox.xpm
samples/widgets/icons/notebook.xpm
samples/widgets/icons/radiobox.xpm
samples/widgets/icons/scrolbar.xpm
samples/widgets/icons/slider.xpm
samples/widgets/icons/statbox.xpm
samples/widgets/icons/stattext.xpm
samples/widgets/icons/text.xpm
src/common/popupcmn.cpp
src/gtk/window.cpp
src/gtk1/window.cpp
src/univ/button.cpp
src/univ/combobox.cpp
src/univ/themes/gtk.cpp

index 3304d277ea72b8744c1fc99a2127ed75fcaac618..5af129e218992cafb77988f392126140ad2c73ca 100644 (file)
@@ -250,6 +250,7 @@ public:
 
     // return the bitmaps to use for combobox button
     virtual void GetComboBitmaps(wxBitmap *bmpNormal,
+                                 wxBitmap *bmpFocus,
                                  wxBitmap *bmpPressed,
                                  wxBitmap *bmpDisabled) = 0;
 
@@ -572,9 +573,11 @@ public:
         { m_renderer->DrawMenuSeparator(dc, y, geomInfo); }
 #endif
     virtual void GetComboBitmaps(wxBitmap *bmpNormal,
+                                 wxBitmap *bmpFocus,
                                  wxBitmap *bmpPressed,
                                  wxBitmap *bmpDisabled)
-        { m_renderer->GetComboBitmaps(bmpNormal, bmpPressed, bmpDisabled); }
+        { m_renderer->GetComboBitmaps(bmpNormal, bmpFocus,
+                                      bmpPressed, bmpDisabled); }
 
     virtual void AdjustSize(wxSize *size, const wxWindow *window)
         { m_renderer->AdjustSize(size, window); }
index 5fa2aa593f03666108c8919ba9f2b39f51e1c1f3..9310e842b00ffdbb195456778d720b4691e4e239 100644 (file)
@@ -1,37 +1,37 @@
-/* XPM */
-static char *magick[] = {
-/* columns rows colors chars-per-pixel */
-"16 15 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #808080",
-"$ c #c0c0c0",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"                ",
-" $$$$$$$$$$$$$$ ",
-" $$$# #$$$#  #$ ",
-" $$$ $ $$$ $$ $ ",
-" $#  $ $$$ $$ $ ",
-" $ $ $   $#  #$ ",
-" $ $ $  $ $$$$$ ",
-" $# $$  $ $$$$$ ",
-"     $ $        ",
-" $$$ $$ $$$$$$$ ",
-" $$$ $ $$  $  $ ",
-" $$$ $ $ $$ $$$ ",
-" $$    $    $$$ ",
-" $    $$$$$$$$$ ",
-"                "
-};
+/* XPM */\r
+static char *magick[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"16 15 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c #808080",\r
+"$ c none",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"                ",\r
+" $$$$$$$$$$$$$$ ",\r
+" $$$# #$$$#  #$ ",\r
+" $$$ $ $$$ $$ $ ",\r
+" $#  $ $$$ $$ $ ",\r
+" $ $ $   $#  #$ ",\r
+" $ $ $  $ $$$$$ ",\r
+" $# $$  $ $$$$$ ",\r
+"     $ $        ",\r
+" $$$ $$ $$$$$$$ ",\r
+" $$$ $ $$  $  $ ",\r
+" $$$ $ $ $$ $$$ ",\r
+" $$    $    $$$ ",\r
+" $    $$$$$$$$$ ",\r
+"                "\r
+};\r
index d06b3a3ed112b89434cfadcb4fda3b3b80bafe30..69fb0f184626162975cc0160107c0392257025ca 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *button_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"#####                      #####",
-"#### :::::::::::::::::::::: ####",
-"### :::::::::::::::::::::::$ ###",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"## ::######################$$ ##",
-"### $$$$$$$$$$$$$$$$$$$$$$$$ ###",
-"#### $$$$$$$$$$$$$$$$$$$$$$ ####",
-"#####                      #####",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *button_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"#####                      #####",\r
+"#### :::::::::::::::::::::: ####",\r
+"### :::::::::::::::::::::::$ ###",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"## ::######################$$ ##",\r
+"### $$$$$$$$$$$$$$$$$$$$$$$$ ###",\r
+"#### $$$$$$$$$$$$$$$$$$$$$$ ####",\r
+"#####                      #####",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index 375cfddabb3090532349f48c820d25ddf6e3c900..b6bd9ecbf519a2b1f5b6fe0b9708d18a043b967c 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *checkbox_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"################################",
-"################################",
-"#####$$$$$$$$$$$$$$$$$$$$$$#####",
-"####$                     #:####",
-"####$ ::::::::::::::::::::#:####",
-"####$ ::::::::::::::::::::#:####",
-"####$ ::::::::::::::::::::#:####",
-"####$ :::  ::::::::::  :::#:####",
-"####$ :::   ::::::::   :::#:####",
-"####$ ::::   ::::::   ::::#:####",
-"####$ :::::   ::::   :::::#:####",
-"####$ ::::::   ::   ::::::#:####",
-"####$ :::::::      :::::::#:####",
-"####$ ::::::::    ::::::::#:####",
-"####$ ::::::::    ::::::::#:####",
-"####$ :::::::      :::::::#:####",
-"####$ ::::::   ::   ::::::#:####",
-"####$ :::::   ::::   :::::#:####",
-"####$ ::::   ::::::   ::::#:####",
-"####$ :::   ::::::::   :::#:####",
-"####$ :::  ::::::::::  :::#:####",
-"####$ ::::::::::::::::::::#:####",
-"####$ ::::::::::::::::::::#:####",
-"####$ ::::::::::::::::::::#:####",
-"####$ #####################:####",
-"#####::::::::::::::::::::::#####",
-"################################",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *checkbox_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"#####$$$$$$$$$$$$$$$$$$$$$$#####",\r
+"####$                     #:####",\r
+"####$ ::::::::::::::::::::#:####",\r
+"####$ ::::::::::::::::::::#:####",\r
+"####$ ::::::::::::::::::::#:####",\r
+"####$ :::  ::::::::::  :::#:####",\r
+"####$ :::   ::::::::   :::#:####",\r
+"####$ ::::   ::::::   ::::#:####",\r
+"####$ :::::   ::::   :::::#:####",\r
+"####$ ::::::   ::   ::::::#:####",\r
+"####$ :::::::      :::::::#:####",\r
+"####$ ::::::::    ::::::::#:####",\r
+"####$ ::::::::    ::::::::#:####",\r
+"####$ :::::::      :::::::#:####",\r
+"####$ ::::::   ::   ::::::#:####",\r
+"####$ :::::   ::::   :::::#:####",\r
+"####$ ::::   ::::::   ::::#:####",\r
+"####$ :::   ::::::::   :::#:####",\r
+"####$ :::  ::::::::::  :::#:####",\r
+"####$ ::::::::::::::::::::#:####",\r
+"####$ ::::::::::::::::::::#:####",\r
+"####$ ::::::::::::::::::::#:####",\r
+"####$ #####################:####",\r
+"#####::::::::::::::::::::::#####",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index c19dba97458ef8d5e8b3ff5752e24cae7033884f..9bca423db546844e85d0c5fc6a38e68cd10bf31b 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *combobox_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"##                            ##",
-"## ################           ##",
-"## ################   #####   ##",
-"## ################    ###    ##",
-"## ################     #     ##",
-"## ################           ##",
-"##                            ##",
-"#### ############## ######### ##",
-"#### ############## ######### ##",
-"#### ############## #### #### ##",
-"#### ############## ###   ### ##",
-"#### ##       ##### ##     ## ##",
-"#### ############## ######### ##",
-"#### ##        #### ######### ##",
-"#### ############## ######### ##",
-"#### ##         ###           ##",
-"#### ############## ######### ##",
-"#### ##        #### ######### ##",
-"#### ############## ######### ##",
-"#### ##       ##### ##     ## ##",
-"#### ############## ###   ### ##",
-"#### ##        #### #### #### ##",
-"#### ############## ######### ##",
-"#### ############## ######### ##",
-"#### ############## ######### ##",
-"####                          ##",
-"################################",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *combobox_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"##                            ##",\r
+"## ################           ##",\r
+"## ################   #####   ##",\r
+"## ################    ###    ##",\r
+"## ################     #     ##",\r
+"## ################           ##",\r
+"##                            ##",\r
+"#### ############## ######### ##",\r
+"#### ############## ######### ##",\r
+"#### ############## #### #### ##",\r
+"#### ############## ###   ### ##",\r
+"#### ##       ##### ##     ## ##",\r
+"#### ############## ######### ##",\r
+"#### ##        #### ######### ##",\r
+"#### ############## ######### ##",\r
+"#### ##         ###           ##",\r
+"#### ############## ######### ##",\r
+"#### ##        #### ######### ##",\r
+"#### ############## ######### ##",\r
+"#### ##       ##### ##     ## ##",\r
+"#### ############## ###   ### ##",\r
+"#### ##        #### #### #### ##",\r
+"#### ############## ######### ##",\r
+"#### ############## ######### ##",\r
+"#### ############## ######### ##",\r
+"####                          ##",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index 0a3606ba96520b8485d5a17abda293c486f8e4bc..0439a7a008e1a38845f4e4e36911520105881a82 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *gauge_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"##                            ##",
-"## $$$$$$$$$$$$$$$$$::::::::: ##",
-"## $$$$$$$$$$$$$$$$$::::::::: ##",
-"## $$$$$$$$$$$$$$$$$::::::::: ##",
-"## $$$$ $$$$$ $$$$$ :::: :::: ##",
-"## $$$$ $$$$$ $$$$$ :::: :::: ##",
-"## $$$$ $$$$$ $$$$$ :::: :::: ##",
-"## $$$$ $$$$$ $$$$$ :::: :::: ##",
-"## $$$$ $$$$$ $$$$$ :::: :::: ##",
-"## $$$$ $$$$$ $$$$$ :::: :::: ##",
-"## $$$$ $$$$$ $$$$$ :::: :::: ##",
-"## $$$$ $$$$$ $$$$$ :::: :::: ##",
-"## $$$$$$$$$$$$$$$$$::::::::: ##",
-"## $$$$$$$$$$$$$$$$$::::::::: ##",
-"## $$$$$$$$$$$$$$$$$::::::::: ##",
-"##                            ##",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *gauge_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"##                            ##",\r
+"## $$$$$$$$$$$$$$$$$::::::::: ##",\r
+"## $$$$$$$$$$$$$$$$$::::::::: ##",\r
+"## $$$$$$$$$$$$$$$$$::::::::: ##",\r
+"## $$$$ $$$$$ $$$$$ :::: :::: ##",\r
+"## $$$$ $$$$$ $$$$$ :::: :::: ##",\r
+"## $$$$ $$$$$ $$$$$ :::: :::: ##",\r
+"## $$$$ $$$$$ $$$$$ :::: :::: ##",\r
+"## $$$$ $$$$$ $$$$$ :::: :::: ##",\r
+"## $$$$ $$$$$ $$$$$ :::: :::: ##",\r
+"## $$$$ $$$$$ $$$$$ :::: :::: ##",\r
+"## $$$$ $$$$$ $$$$$ :::: :::: ##",\r
+"## $$$$$$$$$$$$$$$$$::::::::: ##",\r
+"## $$$$$$$$$$$$$$$$$::::::::: ##",\r
+"## $$$$$$$$$$$$$$$$$::::::::: ##",\r
+"##                            ##",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index a0fe573dc50b17b49f6eda3b08baa0878c41736e..58eb588f776de0cb28599aeee3a1af0e84bffcbf 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *listbox_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"###                          ###",
-"### ############## ######### ###",
-"### ############## ######### ###",
-"### ############## #### #### ###",
-"### ############## ###   ### ###",
-"### ##       ##### ##     ## ###",
-"### ############## ######### ###",
-"### ##        #### ######### ###",
-"### ############## ######### ###",
-"### ##         ###           ###",
-"### ############## ######### ###",
-"### ##        #### ######### ###",
-"### ############## ######### ###",
-"### ##       ##### ##     ## ###",
-"### ############## ###   ### ###",
-"### ##        #### #### #### ###",
-"### ############## ######### ###",
-"### ############## ######### ###",
-"### ############## ######### ###",
-"###                          ###",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *listbox_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"###                          ###",\r
+"### ############## ######### ###",\r
+"### ############## ######### ###",\r
+"### ############## #### #### ###",\r
+"### ############## ###   ### ###",\r
+"### ##       ##### ##     ## ###",\r
+"### ############## ######### ###",\r
+"### ##        #### ######### ###",\r
+"### ############## ######### ###",\r
+"### ##         ###           ###",\r
+"### ############## ######### ###",\r
+"### ##        #### ######### ###",\r
+"### ############## ######### ###",\r
+"### ##       ##### ##     ## ###",\r
+"### ############## ###   ### ###",\r
+"### ##        #### #### #### ###",\r
+"### ############## ######### ###",\r
+"### ############## ######### ###",\r
+"### ############## ######### ###",\r
+"###                          ###",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index 411ea74cabcce4e3a4829d4ce3b26602e263f534..2be2c47432573a01e1cb47a1da2d8cfadabe0682 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *notebook_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"###        #        #        ###",
-"## :::::::$ :::::::$ :::::::$ ##",
-"## :######$ :######$ :######$ ##",
-"## :######$ :######$ :######$ ##",
-"## :######$                   ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## :########################$ ##",
-"## $$$$$$$$$$$$$$$$$$$$$$$$$$ ##",
-"##                            ##",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *notebook_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"###        #        #        ###",\r
+"## :::::::$ :::::::$ :::::::$ ##",\r
+"## :######$ :######$ :######$ ##",\r
+"## :######$ :######$ :######$ ##",\r
+"## :######$                   ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## :########################$ ##",\r
+"## $$$$$$$$$$$$$$$$$$$$$$$$$$ ##",\r
+"##                            ##",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index 5c1540dd64b4bba3a7bfa8a4a8d714f295bf432e..e0d75d7fbdbe57e32228f2243031c2b84c387678 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *radio_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"################################",
-"################################",
-"###########$$$$$$$$$#:##########",
-"#########$$$       $$#:#########",
-"########$$  $::::::  $::########",
-"#######$$ :::::::::::#$::#######",
-"######$$ :::::::::::::#$::######",
-"#####$$ :::::::::::::::#$::#####",
-"####$$ ::::::#####::::::#$:#####",
-"####$ $:::::$     $#:::::$#:####",
-"###$$ :::::$       $#::::$#:####",
-"###$ :::::$         $:::::$:####",
-"###$ :::::           #::::$:####",
-"###$ :::::           #::::$:####",
-"###$ :::::           #::::$:####",
-"###$ :::::           #::::$:####",
-"###$ :::::           #::::$:####",
-"###$ :::::$         $:::::$:####",
-"###$$ :::::$       $#::::$#:####",
-"####$ ::::::$     $#:::::$#:####",
-"####$$#::::::#####::::::$#:#####",
-"####:$$#:::::::::::::::$#:######",
-"#####:$$$:::::::::::::$#:#######",
-"######:$$$:::::::::::$#:########",
-"#######::$$$::::::$$$::#########",
-"#########:$$$$$$$$$::###########",
-"###########::::::::#############",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *radio_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"###########$$$$$$$$$#:##########",\r
+"#########$$$       $$#:#########",\r
+"########$$  $::::::  $::########",\r
+"#######$$ :::::::::::#$::#######",\r
+"######$$ :::::::::::::#$::######",\r
+"#####$$ :::::::::::::::#$::#####",\r
+"####$$ ::::::#####::::::#$:#####",\r
+"####$ $:::::$     $#:::::$#:####",\r
+"###$$ :::::$       $#::::$#:####",\r
+"###$ :::::$         $:::::$:####",\r
+"###$ :::::           #::::$:####",\r
+"###$ :::::           #::::$:####",\r
+"###$ :::::           #::::$:####",\r
+"###$ :::::           #::::$:####",\r
+"###$ :::::           #::::$:####",\r
+"###$ :::::$         $:::::$:####",\r
+"###$$ :::::$       $#::::$#:####",\r
+"####$ ::::::$     $#:::::$#:####",\r
+"####$$#::::::#####::::::$#:#####",\r
+"####:$$#:::::::::::::::$#:######",\r
+"#####:$$$:::::::::::::$#:#######",\r
+"######:$$$:::::::::::$#:########",\r
+"#######::$$$::::::$$$::#########",\r
+"#########:$$$$$$$$$::###########",\r
+"###########::::::::#############",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index 417940512eb4d7fbf4d44f55579fc5f618e17425..82753672a4020d9327ca7203bff76715350b31af 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *magick[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"##                           ###",
-"## ############ ############ ###",
-"## ############ ############ ###",
-"## ############ ############ ###",
-"## ####### #### #### ####### ###",
-"## ######  #### ####  ###### ###",
-"## #####   #### ####   ##### ###",
-"## ####    #### ####    #### ###",
-"## ###     #### ####     ### ###",
-"## ####    #### ####    #### ###",
-"## #####   #### ####   ##### ###",
-"## ######  #### ####  ###### ###",
-"## ####### #### #### ####### ###",
-"## ############ ############ ###",
-"## ############ ############ ###",
-"## ############ ############ ###",
-"##                           ###",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *magick[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"##                           ###",\r
+"## ############ ############ ###",\r
+"## ############ ############ ###",\r
+"## ############ ############ ###",\r
+"## ####### #### #### ####### ###",\r
+"## ######  #### ####  ###### ###",\r
+"## #####   #### ####   ##### ###",\r
+"## ####    #### ####    #### ###",\r
+"## ###     #### ####     ### ###",\r
+"## ####    #### ####    #### ###",\r
+"## #####   #### ####   ##### ###",\r
+"## ######  #### ####  ###### ###",\r
+"## ####### #### #### ####### ###",\r
+"## ############ ############ ###",\r
+"## ############ ############ ###",\r
+"## ############ ############ ###",\r
+"##                           ###",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index 05f91810dd02c63974aa07a81bf568f5e0d61a30..aa303071649c7cb15532d93570f2c1cff28911f5 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *slider_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"#######      ###################",
-"###### :::::$ ##################",
-"###### :####$ ##################",
-"###### :####$ ##################",
-"###### :####$ ##################",
-"###### :####$ ##################",
-"###### :####$ ##################",
-"##     :####$                 ##",
-"## $$$ :####$ $$$$$$$$$$$$$$$ ##",
-"## ### :####$ ############### ##",
-"## ### :####$ ############### ##",
-"## ### :####$ ############### ##",
-"###### :####$ ##################",
-"###### :####$ ##################",
-"###### :$$$$$ ##################",
-"#######      ###################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *slider_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"#######      ###################",\r
+"###### :::::$ ##################",\r
+"###### :####$ ##################",\r
+"###### :####$ ##################",\r
+"###### :####$ ##################",\r
+"###### :####$ ##################",\r
+"###### :####$ ##################",\r
+"##     :####$                 ##",\r
+"## $$$ :####$ $$$$$$$$$$$$$$$ ##",\r
+"## ### :####$ ############### ##",\r
+"## ### :####$ ############### ##",\r
+"## ### :####$ ############### ##",\r
+"###### :####$ ##################",\r
+"###### :####$ ##################",\r
+"###### :$$$$$ ##################",\r
+"#######      ###################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index 6440f5ded16b749986c2c050a90a07d6f82d1c78..5e7ef5aadc16417da4082683846b879df4017d15 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *statbox_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"################################",
-"######## ### # ### #    ########",
-"######## ### # ### #### ########",
-"######### # ### # #### #########",
-"##    #### ##### #### ####    ##",
-"## ###### # #### ### ######## ##",
-"## ##### ### ### ### ######## ##",
-"## ##### ### ### ###    ##### ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"## ########################## ##",
-"##                            ##",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *statbox_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"######## ### # ### #    ########",\r
+"######## ### # ### #### ########",\r
+"######### # ### # #### #########",\r
+"##    #### ##### #### ####    ##",\r
+"## ###### # #### ### ######## ##",\r
+"## ##### ### ### ### ######## ##",\r
+"## ##### ### ### ###    ##### ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"## ########################## ##",\r
+"##                            ##",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index 2e23bbbed14ac1aae716e28c67cefe9ea3e3a5b2..dec5d9fe062354cc152e9f94e3e7dcd0e030c463 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *stattext_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"############### ################",
-"##############  ################",
-"#############   ################",
-"############    ################",
-"###########$    ################",
-"##########$ #   ################",
-"########## ##   ########   #   #",
-"#########  ##   ######   #    ##",
-"########$ ###   ######  ###   ##",
-"#######$ ####   #####  ####   ##",
-"####### #####   ####   ###    ##",
-"######$         ####   ###   ###",
-"#####$ ######   ###   ####   ###",
-"####$ #######   ###   ###    ###",
-"#### ########   ###   ###   ####",
-"###  ########   ###   ##    ####",
-"##  #########    ##     #     ##",
-"#     #####        #   ##    ###",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *stattext_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"############### ################",\r
+"##############  ################",\r
+"#############   ################",\r
+"############    ################",\r
+"###########$    ################",\r
+"##########$ #   ################",\r
+"########## ##   ########   #   #",\r
+"#########  ##   ######   #    ##",\r
+"########$ ###   ######  ###   ##",\r
+"#######$ ####   #####  ####   ##",\r
+"####### #####   ####   ###    ##",\r
+"######$         ####   ###   ###",\r
+"#####$ ######   ###   ####   ###",\r
+"####$ #######   ###   ###    ###",\r
+"#### ########   ###   ###   ####",\r
+"###  ########   ###   ##    ####",\r
+"##  #########    ##     #     ##",\r
+"#     #####        #   ##    ###",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index deb8b6e0451fe91710d38e83dc91afc44c1e5f26..3911f2771f3c1fc1546ababdba2979cff428646d 100644 (file)
@@ -1,54 +1,54 @@
-/* XPM */
-static char *text_xpm[] = {
-/* columns rows colors chars-per-pixel */
-"32 32 16 1",
-"  c Gray0",
-". c #808000",
-"X c #000080",
-"o c #808080",
-"O c #000000",
-"+ c #808000",
-"@ c #000080",
-"# c #c0c0c0",
-"$ c #808080",
-"% c Red",
-"& c Green",
-"* c Yellow",
-"= c Blue",
-"- c Magenta",
-"; c Cyan",
-": c Gray100",
-/* pixels */
-"################################",
-"################################",
-"################################",
-"################################",
-"################################",
-"############################ ###",
-"############################ ###",
-"###############   ########## ###",
-"###############   ########## ###",
-"###############   ########## ###",
-"###############   ########## ###",
-"###############   ########## ###",
-"###############   ########## ###",
-"####        ###         #### ###",
-"###  #####   ##   ####   ### ###",
-"###  #####   ##   ####   ### ###",
-"######       ##   ####   ### ###",
-"####         ##   ####   ### ###",
-"###   ####   ##   ####   ### ###",
-"###   ####   ##   ####   ### ###",
-"###   ####   ##   ####   ### ###",
-"###   ####   ##   ####   ### ###",
-"###   ####   ##   ####   ### ###",
-"###   ####   ##   ####   ### ###",
-"####         ##         #### ###",
-"############################ ###",
-"############################ ###",
-"################################",
-"################################",
-"################################",
-"################################",
-"################################"
-};
+/* XPM */\r
+static char *text_xpm[] = {\r
+/* columns rows colors chars-per-pixel */\r
+"32 32 16 1",\r
+"  c Gray0",\r
+". c #808000",\r
+"X c #000080",\r
+"o c #808080",\r
+"O c #000000",\r
+"+ c #808000",\r
+"@ c #000080",\r
+"# c none",\r
+"$ c #808080",\r
+"% c Red",\r
+"& c Green",\r
+"* c Yellow",\r
+"= c Blue",\r
+"- c Magenta",\r
+"; c Cyan",\r
+": c Gray100",\r
+/* pixels */\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"############################ ###",\r
+"############################ ###",\r
+"###############   ########## ###",\r
+"###############   ########## ###",\r
+"###############   ########## ###",\r
+"###############   ########## ###",\r
+"###############   ########## ###",\r
+"###############   ########## ###",\r
+"####        ###         #### ###",\r
+"###  #####   ##   ####   ### ###",\r
+"###  #####   ##   ####   ### ###",\r
+"######       ##   ####   ### ###",\r
+"####         ##   ####   ### ###",\r
+"###   ####   ##   ####   ### ###",\r
+"###   ####   ##   ####   ### ###",\r
+"###   ####   ##   ####   ### ###",\r
+"###   ####   ##   ####   ### ###",\r
+"###   ####   ##   ####   ### ###",\r
+"###   ####   ##   ####   ### ###",\r
+"####         ##         #### ###",\r
+"############################ ###",\r
+"############################ ###",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################",\r
+"################################"\r
+};\r
index d6319df90405c9389ae4b9883b47b4f6efb22653..36382fca0ab7d8d8f8dd5eb2f7e344e0203d85e7 100644 (file)
@@ -187,10 +187,17 @@ void wxPopupTransientWindow::Popup(wxWindow *winFocus)
         m_child = this;
     }
 
+    // we can't capture mouse before the window is shown in wxGTL
+#ifdef __WXGTK__
+    Show();
+#endif
+
     m_child->CaptureMouse();
     m_child->PushEventHandler(new wxPopupWindowHandler(this));
 
+#ifndef __WXGTK__
     Show();
+#endif
 
     m_focus = winFocus ? winFocus : this;
     m_focus->PushEventHandler(new wxPopupFocusHandler(this));
index 15b54ffc16f9773d70d4959560877edfd85c1fa0..8dfbf2b0962ba6f1ff4ac7b5b445fc45466b4b05 100644 (file)
@@ -3743,15 +3743,13 @@ void wxWindowGTK::CaptureMouse()
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
 
-    wxCHECK_RET( g_captureWindow == NULL, wxT("CaptureMouse called twice") );
-
     GdkWindow *window = (GdkWindow*) NULL;
     if (m_wxwindow)
         window = GTK_PIZZA(m_wxwindow)->bin_window;
     else
         window = GetConnectWidget()->window;
 
-    if (!window) return;
+    wxCHECK_RET( window, _T("CaptureMouse() failed") );
 
     wxCursor* cursor = & m_cursor;
     if (!cursor->Ok())
@@ -3774,7 +3772,7 @@ void wxWindowGTK::ReleaseMouse()
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
 
-    wxCHECK_RET( g_captureWindow, wxT("ReleaseMouse called twice") );
+    wxCHECK_RET( g_captureWindow, wxT("can't release mouse - not captured") );
 
     GdkWindow *window = (GdkWindow*) NULL;
     if (m_wxwindow)
index 15b54ffc16f9773d70d4959560877edfd85c1fa0..8dfbf2b0962ba6f1ff4ac7b5b445fc45466b4b05 100644 (file)
@@ -3743,15 +3743,13 @@ void wxWindowGTK::CaptureMouse()
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
 
-    wxCHECK_RET( g_captureWindow == NULL, wxT("CaptureMouse called twice") );
-
     GdkWindow *window = (GdkWindow*) NULL;
     if (m_wxwindow)
         window = GTK_PIZZA(m_wxwindow)->bin_window;
     else
         window = GetConnectWidget()->window;
 
-    if (!window) return;
+    wxCHECK_RET( window, _T("CaptureMouse() failed") );
 
     wxCursor* cursor = & m_cursor;
     if (!cursor->Ok())
@@ -3774,7 +3772,7 @@ void wxWindowGTK::ReleaseMouse()
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid window") );
 
-    wxCHECK_RET( g_captureWindow, wxT("ReleaseMouse called twice") );
+    wxCHECK_RET( g_captureWindow, wxT("can't release mouse - not captured") );
 
     GdkWindow *window = (GdkWindow*) NULL;
     if (m_wxwindow)
index a6438e0d51c83d0131dff8925f3483cebf0b01de..65a5b69c9bbfbd87f5e64f0ff4a7d143207e4133 100644 (file)
@@ -152,7 +152,11 @@ wxSize wxButton::DoGetBestClientSize() const
 
 void wxButton::DoDraw(wxControlRenderer *renderer)
 {
-    renderer->DrawButtonBorder();
+    if ( !(GetWindowStyle() & wxBORDER_NONE) )
+    {
+        renderer->DrawButtonBorder();
+    }
+
     renderer->DrawLabel(m_bitmap, m_marginBmpX, m_marginBmpY);
 }
 
index b25e4bcb648d33eff28401ee3023f152377762de..76544591d44bb34a5987cf3349336d3851e6e85c 100644 (file)
@@ -76,25 +76,35 @@ public:
     wxComboButton(wxComboControl *combo)
         : wxBitmapButton(combo->GetParent(), -1, wxNullBitmap,
                          wxDefaultPosition, wxDefaultSize,
-                         wxBORDER_NONE)
+                         wxBORDER_NONE | wxBU_EXACTFIT)
     {
         m_combo = combo;
 
-        wxBitmap bmpNormal, bmpPressed, bmpDisabled;
+        wxBitmap bmpNormal, bmpFocus, bmpPressed, bmpDisabled;
+
+        GetRenderer()->GetComboBitmaps(&bmpNormal,
+                                       &bmpFocus,
+                                       &bmpPressed,
+                                       &bmpDisabled);
 
-        GetRenderer()->GetComboBitmaps(&bmpNormal, &bmpPressed, &bmpDisabled);
         SetBitmapLabel(bmpNormal);
-        SetBitmapFocus(bmpNormal);
-        SetBitmapSelected(bmpPressed);
-        SetBitmapDisabled(bmpDisabled);
+        SetBitmapFocus(bmpFocus.Ok() ? bmpFocus : bmpNormal);
+        SetBitmapSelected(bmpPressed.Ok() ? bmpPressed : bmpNormal);
+        SetBitmapDisabled(bmpDisabled.Ok() ? bmpDisabled : bmpNormal);
 
-        SetSize(bmpNormal.GetWidth(), bmpNormal.GetHeight());
+        SetBestSize(wxDefaultSize);
     }
 
 protected:
     void OnButton(wxCommandEvent& event) { m_combo->ShowPopup(); }
 
-    virtual wxSize DoGetBestSize() const { return GetSize(); }
+    virtual wxSize DoGetBestClientSize() const
+    {
+        const wxBitmap& bmp = GetBitmapLabel();
+
+        return wxSize(bmp.GetWidth(), bmp.GetHeight());
+
+    }
 
 private:
     wxComboControl *m_combo;
@@ -241,7 +251,8 @@ bool wxComboControl::Create(wxWindow *parent,
         m_heightPopup = size.y - DoGetBestSize().y;
     }
 
-    DoSetSize(pos.x, pos.y, size.x, size.y);
+    SetBestSize(size);
+    Move(pos);
 
     // create the popup window immediately here to allow creating the controls
     // with parent == GetPopupWindow() from the derived class ctor
@@ -300,7 +311,7 @@ void wxComboControl::DoMoveWindow(int x, int y, int width, int height)
     width -= rectBorders.x + rectBorders.width;
     height -= rectBorders.y + rectBorders.height;
 
-    wxSize sizeBtn = m_btn->GetSize();
+    wxSize sizeBtn = m_btn->GetBestSize();
 
     wxCoord wText = width - sizeBtn.x;
     m_text->SetSize(x, y, wText, height);
index fe2695813a46f91a6824ab9f18a7b29e11c63006..94fd15e47ef61cab2e8e4a81fdb6891060e713ee 100644 (file)
@@ -30,6 +30,7 @@
     #include "wx/dcmemory.h"
     #include "wx/window.h"
 
+    #include "wx/bmpbuttn.h"
     #include "wx/button.h"
     #include "wx/checkbox.h"
     #include "wx/listbox.h"
@@ -52,7 +53,7 @@
 // constants (to be removed, for testing only)
 // ----------------------------------------------------------------------------
 
-static const size_t BORDER_THICKNESS = 10;
+static const size_t BORDER_THICKNESS = 2;
 
 // ----------------------------------------------------------------------------
 // wxGTKRenderer: draw the GUI elements in GTK style
@@ -857,7 +858,7 @@ void wxGTKRenderer::DrawBorder(wxDC& dc,
     switch ( border )
     {
         case wxBORDER_SUNKEN:
-            for ( width = 0; width < BORDER_THICKNESS; width++ )
+            for ( width = 0; width < BORDER_THICKNESS / 2; width++ )
             {
                 DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
                 DrawShadedRect(dc, &rect, m_penBlack, m_penLightGrey);
@@ -865,24 +866,33 @@ void wxGTKRenderer::DrawBorder(wxDC& dc,
             break;
 
         case wxBORDER_STATIC:
-            DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
+            for ( width = 0; width < BORDER_THICKNESS / 2; width++ )
+            {
+                DrawShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
+            }
             break;
 
         case wxBORDER_RAISED:
-            for ( width = 0; width < BORDER_THICKNESS; width++ )
+            for ( width = 0; width < BORDER_THICKNESS / 2; width++ )
             {
                 DrawRaisedBorder(dc, &rect);
             }
             break;
 
         case wxBORDER_DOUBLE:
-            DrawShadedRect(dc, &rect, m_penLightGrey, m_penBlack);
-            DrawShadedRect(dc, &rect, m_penHighlight, m_penDarkGrey);
-            DrawRect(dc, &rect, m_penLightGrey);
+            for ( width = 0; width < BORDER_THICKNESS / 3; width++ )
+            {
+                DrawShadedRect(dc, &rect, m_penLightGrey, m_penBlack);
+                DrawShadedRect(dc, &rect, m_penHighlight, m_penDarkGrey);
+                DrawRect(dc, &rect, m_penLightGrey);
+            }
             break;
 
         case wxBORDER_SIMPLE:
-            DrawRect(dc, &rect, m_penBlack);
+            for ( width = 0; width < BORDER_THICKNESS; width++ )
+            {
+                DrawRect(dc, &rect, m_penBlack);
+            }
             break;
 
         default:
@@ -910,11 +920,11 @@ wxRect wxGTKRenderer::GetBorderDimensions(wxBorder border) const
 
         case wxBORDER_SIMPLE:
         case wxBORDER_STATIC:
-            width = 1;
+            width = BORDER_THICKNESS;
             break;
 
         case wxBORDER_DOUBLE:
-            width = 3;
+            width = 3*BORDER_THICKNESS;
             break;
 
         default:
@@ -954,15 +964,18 @@ void wxGTKRenderer::DrawTextBorder(wxDC& dc,
 {
     wxRect rect = rectOrig;
 
-    if ( flags & wxCONTROL_FOCUSED )
-    {
-        DrawRect(dc, &rect, m_penBlack);
-        DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
-    }
-    else // !focused
+    for ( size_t width = 0; width < BORDER_THICKNESS / 2; width++ )
     {
-        DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
-        DrawAntiShadedRect(dc, &rect, m_penBlack, m_penHighlight);
+        if ( flags & wxCONTROL_FOCUSED )
+        {
+            DrawRect(dc, &rect, m_penBlack);
+            DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
+        }
+        else // !focused
+        {
+            DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
+            DrawAntiShadedRect(dc, &rect, m_penBlack, m_penHighlight);
+        }
     }
 
     if ( rectIn )
@@ -980,8 +993,12 @@ void wxGTKRenderer::DrawButtonBorder(wxDC& dc,
     {
         // button pressed: draw a black border around it and an inward shade
         DrawRect(dc, &rect, m_penBlack);
-        DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
-        DrawAntiShadedRect(dc, &rect, m_penBlack, m_penDarkGrey);
+
+        for ( size_t width = 0; width < BORDER_THICKNESS / 2; width++ )
+        {
+            DrawAntiShadedRect(dc, &rect, m_penDarkGrey, m_penHighlight);
+            DrawAntiShadedRect(dc, &rect, m_penBlack, m_penDarkGrey);
+        }
     }
     else
     {
@@ -999,10 +1016,13 @@ void wxGTKRenderer::DrawButtonBorder(wxDC& dc,
         }
 
         // now draw a normal button
-        DrawShadedRect(dc, &rect, m_penHighlight, m_penBlack);
-        DrawAntiShadedRect(dc, &rect,
-                           wxPen(GetBackgroundColour(flags), 0, wxSOLID),
-                           m_penDarkGrey);
+        for ( size_t width = 0; width < BORDER_THICKNESS / 2; width++ )
+        {
+            DrawShadedRect(dc, &rect, m_penHighlight, m_penBlack);
+            DrawAntiShadedRect(dc, &rect,
+                               wxPen(GetBackgroundColour(flags), 0, wxSOLID),
+                               m_penDarkGrey);
+        }
     }
 
     if ( rectIn )
@@ -2280,6 +2300,14 @@ int wxGTKRenderer::PixelToScrollbar(const wxScrollBar *scrollbar,
 
 void wxGTKRenderer::AdjustSize(wxSize *size, const wxWindow *window)
 {
+#if wxUSE_BMPBUTTON
+    if ( wxDynamicCast(window, wxBitmapButton) )
+    {
+        size->x += 4;
+        size->y += 4;
+    } else
+#endif // wxUSE_BMPBUTTON
+#if wxUSE_BUTTON
     if ( wxDynamicCast(window, wxButton) )
     {
         if ( !(window->GetWindowStyle() & wxBU_EXACTFIT) )
@@ -2293,8 +2321,9 @@ void wxGTKRenderer::AdjustSize(wxSize *size, const wxWindow *window)
             // button border width
             size->y += 4;
         }
-    }
-    else if ( wxDynamicCast(window, wxScrollBar) )
+    } else
+#endif wxUSE_BUTTON
+    if ( wxDynamicCast(window, wxScrollBar) )
     {
         // we only set the width of vert scrollbars and height of the
         // horizontal ones