projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
or -> || (how did that compile on GCC anyway?)
[wxWidgets.git]
/
src
/
generic
/
combog.cpp
diff --git
a/src/generic/combog.cpp
b/src/generic/combog.cpp
index 29b9d21f9676c35de4842574caa98e61a2624697..ef4d47169edd647f1c461c6039bfa848504259ea 100644
(file)
--- a/
src/generic/combog.cpp
+++ b/
src/generic/combog.cpp
@@
-32,6
+32,7
@@
#include "wx/combobox.h"
#include "wx/dcclient.h"
#include "wx/settings.h"
#include "wx/combobox.h"
#include "wx/dcclient.h"
#include "wx/settings.h"
+ #include "wx/textctrl.h"
#endif
#include "wx/dcbuffer.h"
#endif
#include "wx/dcbuffer.h"
@@
-41,35
+42,50
@@
#if defined(__WXUNIVERSAL__)
#if defined(__WXUNIVERSAL__)
-#define TEXTCTRLXADJUST 0 // position adjustment for wxTextCtrl, with zero indent
+// position adjustment for wxTextCtrl, to achieve zero left margin
+// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp
+#define TEXTCTRLXADJUST 0
+
#define TEXTCTRLYADJUST 0
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 19
#elif defined(__WXMSW__)
#define TEXTCTRLYADJUST 0
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 19
#elif defined(__WXMSW__)
-#define TEXTCTRLXADJUST 2 // position adjustment for wxTextCtrl, with zero indent
+// position adjustment for wxTextCtrl, to achieve zero left margin
+// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp
+#define TEXTCTRLXADJUST 2
+
#define TEXTCTRLYADJUST 3
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 17
#elif defined(__WXGTK__)
#define TEXTCTRLYADJUST 3
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 17
#elif defined(__WXGTK__)
-#define TEXTCTRLXADJUST -1 // position adjustment for wxTextCtrl, with zero indent
+// position adjustment for wxTextCtrl, to achieve zero left margin
+// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp
+#define TEXTCTRLXADJUST -1
+
#define TEXTCTRLYADJUST 0
#define TEXTXADJUST 1 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 23
#elif defined(__WXMAC__)
#define TEXTCTRLYADJUST 0
#define TEXTXADJUST 1 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 23
#elif defined(__WXMAC__)
-#define TEXTCTRLXADJUST 0 // position adjustment for wxTextCtrl, with zero indent
+// position adjustment for wxTextCtrl, to achieve zero left margin
+// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp
+#define TEXTCTRLXADJUST 0
+
#define TEXTCTRLYADJUST 0
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 22
#else
#define TEXTCTRLYADJUST 0
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 22
#else
-#define TEXTCTRLXADJUST 0 // position adjustment for wxTextCtrl, with zero indent
+// position adjustment for wxTextCtrl, to achieve zero left margin
+// meaningless if LEFT_MARGIN_CAN_BE_SET set to 1 in combocmn.cpp
+#define TEXTCTRLXADJUST 0
+
#define TEXTCTRLYADJUST 0
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 19
#define TEXTCTRLYADJUST 0
#define TEXTXADJUST 0 // how much is read-only text's x adjusted
#define DEFAULT_DROPBUTTON_WIDTH 19
@@
-236,7
+252,7
@@
void wxGenericComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
// Set border colour
wxPen pen1( wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT),
customBorder,
// Set border colour
wxPen pen1( wxSystemSettings::GetColour(wxSYS_COLOUR_GRAYTEXT),
customBorder,
- wx
SOLID
);
+ wx
PENSTYLE_SOLID
);
dc.SetPen( pen1 );
// area around both controls
dc.SetPen( pen1 );
// area around both controls
@@
-279,7
+295,7
@@
void wxGenericComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
// clear main background
dc.DrawRectangle(rect);
// clear main background
dc.DrawRectangle(rect);
-
+
if ( !m_btn )
{
// Standard button rendering
if ( !m_btn )
{
// Standard button rendering
@@
-429,7
+445,8
@@
bool wxGenericComboCtrl::IsKeyPopupToggle(const wxKeyEvent& event) const
}
else
{
}
else
{
- if ( keycode == WXK_DOWN && event.AltDown() )
+ if ( (keycode == WXK_DOWN && event.AltDown()) ||
+ (keycode == WXK_F4) )
return true;
}
return true;
}