Small correction for wxButton mouse events under GTK 2.0.
Minor doc updates. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -160,7 +160,7 @@ Although everything works fine inside the program, things can get nasty when
|
|||||||
it tries to communicate with the outside world which, sadly, often expects
|
it tries to communicate with the outside world which, sadly, often expects
|
||||||
ANSI strings (a notable exception is the entire Win32 API which accepts either
|
ANSI strings (a notable exception is the entire Win32 API which accepts either
|
||||||
Unicode or ANSI strings and which thus makes it unnecessary to ever perform
|
Unicode or ANSI strings and which thus makes it unnecessary to ever perform
|
||||||
any conversions in the program).
|
any conversions in the program). GTK 2.0 only accepts UTF-8 strings.
|
||||||
|
|
||||||
To get a ANSI string from a wxString, you may use the
|
To get a ANSI string from a wxString, you may use the
|
||||||
mb\_str() function which always returns an ANSI
|
mb\_str() function which always returns an ANSI
|
||||||
@@ -175,7 +175,8 @@ the Unicode string.
|
|||||||
\subsection{Unicode-related compilation settings}
|
\subsection{Unicode-related compilation settings}
|
||||||
|
|
||||||
You should define {\tt wxUSE\_UNICODE} to $1$ to compile your program in
|
You should define {\tt wxUSE\_UNICODE} to $1$ to compile your program in
|
||||||
Unicode mode. Note that it currently only works in Win32 and that some parts of
|
Unicode mode. Note that it currently only works in Win32 and GTK 2.0 and
|
||||||
|
that some parts of
|
||||||
wxWindows are not Unicode-compliant yet (ODBC classes, for example). If you
|
wxWindows are not Unicode-compliant yet (ODBC classes, for example). If you
|
||||||
compile your program in ANSI mode you can still define {\tt wxUSE\_WCHAR\_T}
|
compile your program in ANSI mode you can still define {\tt wxUSE\_WCHAR\_T}
|
||||||
to get some limited support for {\tt wchar\_t} type.
|
to get some limited support for {\tt wchar\_t} type.
|
||||||
|
@@ -5,7 +5,7 @@ from www.gtk.org. It makes use of GTK+'s native widgets wherever
|
|||||||
possible and uses wxWindows' generic controls when needed. GTK+
|
possible and uses wxWindows' generic controls when needed. GTK+
|
||||||
itself has been ported to a number of systems, but so far only the
|
itself has been ported to a number of systems, but so far only the
|
||||||
original X11 version is supported. Support for the recently released
|
original X11 version is supported. Support for the recently released
|
||||||
GTK+ 2.0 including Unicode support is still under construction.
|
GTK+ 2.0 including Unicode support is work in progress.
|
||||||
|
|
||||||
You will need GTK+ 1.2.3 or higher which is available from:
|
You will need GTK+ 1.2.3 or higher which is available from:
|
||||||
|
|
||||||
|
@@ -65,6 +65,7 @@ public:
|
|||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
void ApplyWidgetStyle();
|
void ApplyWidgetStyle();
|
||||||
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual wxSize DoGetBestSize() const;
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
@@ -65,6 +65,7 @@ public:
|
|||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
void ApplyWidgetStyle();
|
void ApplyWidgetStyle();
|
||||||
|
bool IsOwnGtkWindow( GdkWindow *window );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual wxSize DoGetBestSize() const;
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
@@ -188,6 +188,15 @@ bool wxButton::Enable( bool enable )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxButton::IsOwnGtkWindow( GdkWindow *window )
|
||||||
|
{
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
return GTK_BUTTON(m_widget)->event_window;
|
||||||
|
#else
|
||||||
|
return (window == m_widget->window);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void wxButton::ApplyWidgetStyle()
|
void wxButton::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
SetWidgetStyle();
|
SetWidgetStyle();
|
||||||
|
@@ -188,6 +188,15 @@ bool wxButton::Enable( bool enable )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxButton::IsOwnGtkWindow( GdkWindow *window )
|
||||||
|
{
|
||||||
|
#ifdef __WXGTK20__
|
||||||
|
return GTK_BUTTON(m_widget)->event_window;
|
||||||
|
#else
|
||||||
|
return (window == m_widget->window);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void wxButton::ApplyWidgetStyle()
|
void wxButton::ApplyWidgetStyle()
|
||||||
{
|
{
|
||||||
SetWidgetStyle();
|
SetWidgetStyle();
|
||||||
|
Reference in New Issue
Block a user