support mnemonics for wxStatic/RadioBox and made it easier to add support for more controls by virtualizing the mnemonics support logic (patch 1448178)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -66,8 +66,11 @@ protected:
|
||||
// sets the label to the given string and also sets it for the given widget
|
||||
void GTKSetLabelForLabel(GtkLabel *w, const wxString& label);
|
||||
|
||||
// as GTKSetLabelForLabel() but for a GtkFrame widget
|
||||
// GtkFrame helpers
|
||||
GtkWidget* GTKCreateFrame(const wxString& label);
|
||||
void GTKSetLabelForFrame(GtkFrame *w, const wxString& label);
|
||||
void GTKFrameApplyWidgetStyle(GtkFrame* w, GtkRcStyle* rc);
|
||||
void GTKFrameSetMnemonicWidget(GtkFrame* w, GtkWidget* widget);
|
||||
|
||||
// remove mnemonics ("&"s) from the label
|
||||
static wxString GTKRemoveMnemonics(const wxString& label);
|
||||
|
@@ -127,6 +127,9 @@ public:
|
||||
protected:
|
||||
void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
|
||||
virtual bool GTKWidgetNeedsMnemonic() const;
|
||||
virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
||||
|
@@ -43,6 +43,9 @@ public:
|
||||
virtual bool IsTransparentForMouse() const { return TRUE; }
|
||||
|
||||
protected:
|
||||
virtual bool GTKWidgetNeedsMnemonic() const;
|
||||
virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
|
||||
|
||||
void DoApplyWidgetStyle(GtkRcStyle *style);
|
||||
|
||||
private:
|
||||
|
@@ -65,6 +65,9 @@ public:
|
||||
// --------------
|
||||
|
||||
protected:
|
||||
virtual bool GTKWidgetNeedsMnemonic() const;
|
||||
virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
|
||||
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
@@ -156,6 +156,13 @@ public:
|
||||
virtual bool IsOwnGtkWindow( GdkWindow *window );
|
||||
void ConnectWidget( GtkWidget *widget );
|
||||
|
||||
// Override GTKWidgetNeedsMnemonic and return true if your
|
||||
// needs to set its mnemonic widget, such as for a
|
||||
// GtkLabel for wxStaticText, then do the actual
|
||||
// setting of the widget inside GTKWidgetDoSetMnemonic
|
||||
virtual bool GTKWidgetNeedsMnemonic() const;
|
||||
virtual void GTKWidgetDoSetMnemonic(GtkWidget* w);
|
||||
|
||||
// Returns the default context which usually is anti-aliased
|
||||
PangoContext *GtkGetPangoDefaultContext();
|
||||
|
||||
|
Reference in New Issue
Block a user