From 496e7ec6475277246a75bcec98a6ddd5ca4cde84 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Fri, 13 Feb 2009 10:25:38 +0000 Subject: [PATCH] More GTK prefixing for internal methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/gtk/window.h | 8 ++++---- src/gtk/button.cpp | 2 +- src/gtk/control.cpp | 2 +- src/gtk/dataview.cpp | 4 ++-- src/gtk/dcclient.cpp | 4 ++-- src/gtk/listbox.cpp | 2 +- src/gtk/menu.cpp | 2 +- src/gtk/notebook.cpp | 2 +- src/gtk/textctrl.cpp | 2 +- src/gtk/tglbtn.cpp | 2 +- src/gtk/window.cpp | 18 +++++++++--------- 11 files changed, 24 insertions(+), 24 deletions(-) diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index 7ee5f59..904c47f 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -213,7 +213,7 @@ protected: public: // Returns the default context which usually is anti-aliased - PangoContext *GtkGetPangoDefaultContext(); + PangoContext *GTKGetPangoDefaultContext(); #if wxUSE_TOOLTIPS // applies tooltip to the widget (tip must be UTF-8 encoded) @@ -340,17 +340,17 @@ protected: // modified GTK style with non-standard attributes. If forceStyle=true, // creates empty GtkRcStyle if there are no modifications, otherwise // returns NULL in such case. - GtkRcStyle *CreateWidgetStyle(bool forceStyle = false); + GtkRcStyle *GTKCreateWidgetStyle(bool forceStyle = false); // Overridden in many GTK widgets who have to handle subwidgets - virtual void ApplyWidgetStyle(bool forceStyle = false); + virtual void GTKApplyWidgetStyle(bool forceStyle = false); // helper function to ease native widgets wrapping, called by // ApplyWidgetStyle -- override this, not ApplyWidgetStyle virtual void DoApplyWidgetStyle(GtkRcStyle *style); // sets the border of a given GtkScrolledWindow from a wx style - static void GtkScrolledWindowSetBorder(GtkWidget* w, int style); + static void GTKScrolledWindowSetBorder(GtkWidget* w, int style); // set the current cursor for all GdkWindows making part of this widget // (see GTKGetWindow) diff --git a/src/gtk/button.cpp b/src/gtk/button.cpp index 0861591..066183e 100644 --- a/src/gtk/button.cpp +++ b/src/gtk/button.cpp @@ -211,7 +211,7 @@ void wxButton::SetLabel( const wxString &lbl ) gtk_button_set_label(GTK_BUTTON(m_widget), wxGTK_CONV(labelGTK)); gtk_button_set_use_stock(GTK_BUTTON(m_widget), FALSE); - ApplyWidgetStyle( false ); + GTKApplyWidgetStyle( false ); } bool wxButton::Enable( bool enable ) diff --git a/src/gtk/control.cpp b/src/gtk/control.cpp index f69a1dd..b798788 100644 --- a/src/gtk/control.cpp +++ b/src/gtk/control.cpp @@ -89,7 +89,7 @@ void wxControl::PostCreation(const wxSize& size) // GetBestSize is called. gtk_widget_ensure_style(m_widget); - ApplyWidgetStyle(); + GTKApplyWidgetStyle(); SetInitialSize(size); } diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 2d8a29c..6119d49 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -1828,7 +1828,7 @@ public: m_window = window; - m_context = window->GtkGetPangoDefaultContext(); + m_context = window->GTKGetPangoDefaultContext(); m_layout = pango_layout_new( m_context ); m_fontdesc = pango_font_description_copy( widget->style->font_desc ); @@ -3829,7 +3829,7 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id, m_widget = gtk_scrolled_window_new (NULL, NULL); g_object_ref(m_widget); - GtkScrolledWindowSetBorder(m_widget, style); + GTKScrolledWindowSetBorder(m_widget, style); m_treeview = gtk_tree_view_new(); gtk_container_add (GTK_CONTAINER (m_widget), m_treeview); diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 93788ed..b334b74 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -282,7 +282,7 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window ) : SetDeviceLocalOrigin(widget->allocation.x, widget->allocation.y); } - m_context = window->GtkGetPangoDefaultContext(); + m_context = window->GTKGetPangoDefaultContext(); m_layout = pango_layout_new( m_context ); m_fontdesc = pango_font_description_copy( widget->style->font_desc ); @@ -1813,7 +1813,7 @@ void wxWindowDCImpl::SetFont( const wxFont &font ) { PangoContext *oldContext = m_context; - m_context = m_window->GtkGetPangoDefaultContext(); + m_context = m_window->GTKGetPangoDefaultContext(); // If we switch back/forth between different contexts // we also have to create a new layout. I think so, diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index ad03aaa..842f157 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -375,7 +375,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, } - GtkScrolledWindowSetBorder(m_widget, style); + GTKScrolledWindowSetBorder(m_widget, style); m_treeview = GTK_TREE_VIEW( gtk_tree_view_new( ) ); diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index e0f10d8..a0a65e8 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -91,7 +91,7 @@ void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long st PostCreation(); - ApplyWidgetStyle(); + GTKApplyWidgetStyle(); #endif // wxUSE_LIBHILDON/!wxUSE_LIBHILDON g_object_ref(m_widget); diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 13bc0da..1ace65d 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -422,7 +422,7 @@ bool wxNotebook::InsertPage( size_t position, gtk_notebook_insert_page(notebook, win->m_widget, pageData->m_box, position); /* apply current style */ - GtkRcStyle *style = CreateWidgetStyle(); + GtkRcStyle *style = GTKCreateWidgetStyle(); if ( style ) { gtk_widget_modify_style(pageData->m_label, style); diff --git a/src/gtk/textctrl.cpp b/src/gtk/textctrl.cpp index 11d4eab..25186c9 100644 --- a/src/gtk/textctrl.cpp +++ b/src/gtk/textctrl.cpp @@ -692,7 +692,7 @@ bool wxTextCtrl::Create( wxWindow *parent, GTKSetWrapMode(); - GtkScrolledWindowSetBorder(m_widget, style); + GTKScrolledWindowSetBorder(m_widget, style); gtk_widget_add_events( GTK_WIDGET(m_text), GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK ); diff --git a/src/gtk/tglbtn.cpp b/src/gtk/tglbtn.cpp index 99dfbfb..5033827 100644 --- a/src/gtk/tglbtn.cpp +++ b/src/gtk/tglbtn.cpp @@ -280,7 +280,7 @@ void wxToggleButton::SetLabel(const wxString& label) gtk_button_set_label(GTK_BUTTON(m_widget), wxGTK_CONV(labelGTK)); - ApplyWidgetStyle( false ); + GTKApplyWidgetStyle( false ); } bool wxToggleButton::Enable(bool enable /*=true*/) diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index e88df95..b0b6073 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3741,7 +3741,7 @@ bool wxWindowGTK::SetBackgroundColour( const wxColour &colour ) // apply style change (forceStyle=true so that new style is applied // even if the bg colour changed from valid to wxNullColour) if (GetBackgroundStyle() != wxBG_STYLE_CUSTOM) - ApplyWidgetStyle(true); + GTKApplyWidgetStyle(true); return true; } @@ -3763,17 +3763,17 @@ bool wxWindowGTK::SetForegroundColour( const wxColour &colour ) // apply style change (forceStyle=true so that new style is applied // even if the bg colour changed from valid to wxNullColour): - ApplyWidgetStyle(true); + GTKApplyWidgetStyle(true); return true; } -PangoContext *wxWindowGTK::GtkGetPangoDefaultContext() +PangoContext *wxWindowGTK::GTKGetPangoDefaultContext() { return gtk_widget_get_pango_context( m_widget ); } -GtkRcStyle *wxWindowGTK::CreateWidgetStyle(bool forceStyle) +GtkRcStyle *wxWindowGTK::GTKCreateWidgetStyle(bool forceStyle) { // do we need to apply any changes at all? if ( !forceStyle && @@ -3842,9 +3842,9 @@ GtkRcStyle *wxWindowGTK::CreateWidgetStyle(bool forceStyle) return style; } -void wxWindowGTK::ApplyWidgetStyle(bool forceStyle) +void wxWindowGTK::GTKApplyWidgetStyle(bool forceStyle) { - GtkRcStyle *style = CreateWidgetStyle(forceStyle); + GtkRcStyle *style = GTKCreateWidgetStyle(forceStyle); if ( style ) { DoApplyWidgetStyle(style); @@ -3905,7 +3905,7 @@ bool wxWindowGTK::SetBackgroundStyle(wxBackgroundStyle style) { // apply style change (forceStyle=true so that new style is applied // even if the bg colour changed from valid to wxNullColour): - ApplyWidgetStyle(true); + GTKApplyWidgetStyle(true); } return true; } @@ -4051,7 +4051,7 @@ bool wxWindowGTK::SetFont( const wxFont &font ) // apply style change (forceStyle=true so that new style is applied // even if the font changed from valid to wxNullFont): - ApplyWidgetStyle(true); + GTKApplyWidgetStyle(true); return true; } @@ -4292,7 +4292,7 @@ void wxWindowGTK::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) ) #endif // wxUSE_CARET } -void wxWindowGTK::GtkScrolledWindowSetBorder(GtkWidget* w, int wxstyle) +void wxWindowGTK::GTKScrolledWindowSetBorder(GtkWidget* w, int wxstyle) { //RN: Note that static controls usually have no border on gtk, so maybe //it makes sense to treat that as simply no border at the wx level -- 2.7.4