Get/SetTitle only for wxTopLevelWindow (wxGTK part).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36081 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2005-11-04 11:11:22 +00:00
parent d40209bbc4
commit cb8cc2506b
8 changed files with 42 additions and 34 deletions

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: gtk/mdi.h
// Name: wx/gtk/mdi.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
@ -141,10 +141,10 @@ public:
// no size hints
virtual void DoSetSizeHints( int WXUNUSED(minW),
int WXUNUSED(minH),
int WXUNUSED(maxW) = -1,
int WXUNUSED(maxH) = -1,
int WXUNUSED(incW) = -1,
int WXUNUSED(incH) = -1) {}
int WXUNUSED(maxW) = wxDefaultCoord,
int WXUNUSED(maxH) = wxDefaultCoord,
int WXUNUSED(incW) = wxDefaultCoord,
int WXUNUSED(incH) = wxDefaultCoord) {}
#if wxUSE_TOOLBAR
// no toolbar
@ -162,8 +162,7 @@ public:
{ wxTopLevelWindowBase::SetIcons(icons); }
// no title
void SetTitle( const wxString &title );
wxString GetTitle() const { return m_title; }
virtual void SetTitle( const wxString &title );
// no maximize etc
virtual void Maximize( bool WXUNUSED(maximize) = true ) { }
@ -213,4 +212,3 @@ private:
};
#endif // __MDIH__

View File

@ -43,9 +43,9 @@ public:
virtual ~wxTopLevelWindowGTK();
// implement base class pure virtuals
virtual void Maximize(bool maximize = TRUE);
virtual void Maximize(bool maximize = true);
virtual bool IsMaximized() const;
virtual void Iconize(bool iconize = TRUE);
virtual void Iconize(bool iconize = true);
virtual bool IsIconized() const;
virtual void SetIcon(const wxIcon& icon);
virtual void SetIcons(const wxIconBundle& icons);
@ -58,7 +58,7 @@ public:
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
virtual bool Show(bool show = TRUE);
virtual bool Show(bool show = true);
virtual void Raise();
@ -87,7 +87,6 @@ public:
// do *not* call this to iconize the frame, this is a private function!
void SetIconizeState(bool iconic);
wxString m_title;
int m_miniEdge,
m_miniTitle;
GtkWidget *m_mainWidget;
@ -118,6 +117,8 @@ protected:
virtual void DoSetClientSize(int width, int height);
virtual void DoGetClientSize( int *width, int *height ) const;
wxString m_title;
// is the frame currently iconized?
bool m_isIconized;
// is the frame currently grabbed explicitly

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: gtk/mdi.h
// Name: wx/gtk/mdi.h
// Purpose:
// Author: Robert Roebling
// Id: $Id$
@ -141,10 +141,10 @@ public:
// no size hints
virtual void DoSetSizeHints( int WXUNUSED(minW),
int WXUNUSED(minH),
int WXUNUSED(maxW) = -1,
int WXUNUSED(maxH) = -1,
int WXUNUSED(incW) = -1,
int WXUNUSED(incH) = -1) {}
int WXUNUSED(maxW) = wxDefaultCoord,
int WXUNUSED(maxH) = wxDefaultCoord,
int WXUNUSED(incW) = wxDefaultCoord,
int WXUNUSED(incH) = wxDefaultCoord) {}
#if wxUSE_TOOLBAR
// no toolbar
@ -162,8 +162,7 @@ public:
{ wxTopLevelWindowBase::SetIcons(icons); }
// no title
void SetTitle( const wxString &title );
wxString GetTitle() const { return m_title; }
virtual void SetTitle( const wxString &title );
// no maximize etc
virtual void Maximize( bool WXUNUSED(maximize) = true ) { }
@ -213,4 +212,3 @@ private:
};
#endif // __MDIH__

View File

@ -43,9 +43,9 @@ public:
virtual ~wxTopLevelWindowGTK();
// implement base class pure virtuals
virtual void Maximize(bool maximize = TRUE);
virtual void Maximize(bool maximize = true);
virtual bool IsMaximized() const;
virtual void Iconize(bool iconize = TRUE);
virtual void Iconize(bool iconize = true);
virtual bool IsIconized() const;
virtual void SetIcon(const wxIcon& icon);
virtual void SetIcons(const wxIconBundle& icons);
@ -58,7 +58,7 @@ public:
virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO);
virtual bool Show(bool show = TRUE);
virtual bool Show(bool show = true);
virtual void Raise();
@ -87,7 +87,6 @@ public:
// do *not* call this to iconize the frame, this is a private function!
void SetIconizeState(bool iconic);
wxString m_title;
int m_miniEdge,
m_miniTitle;
GtkWidget *m_mainWidget;
@ -118,6 +117,8 @@ protected:
virtual void DoSetClientSize(int width, int height);
virtual void DoGetClientSize( int *width, int *height ) const;
wxString m_title;
// is the frame currently iconized?
bool m_isIconized;
// is the frame currently grabbed explicitly

View File

@ -155,7 +155,8 @@ public:
virtual bool IsFullScreen() const = 0;
#if defined(__WXMSW__) || \
defined(__WXMOTIF__)
defined(__WXMOTIF__) || \
defined(__WXGTK__)
// FIXME: This is work in progress about moving SetTitle/GetTitle from wxWindow
// to wxTopLevelWindow so initially enabled in wxMSW only to observe results

View File

@ -169,7 +169,8 @@ public:
// -----------------
#if !defined(__WXMSW__) && \
!defined(__WXMOTIF__)
!defined(__WXMOTIF__) && \
!defined(__WXGTK__)
// FIXME: This is work in progress about moving SetTitle/GetTitle from wxWindow
// to wxTopLevelWindow so initially enabled in wxMSW only to observe results

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: toplevel.cpp
// Name: src/gtk/toplevel.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
@ -371,7 +371,7 @@ gtk_frame_unmap_callback( GtkWidget * WXUNUSED(widget),
GdkEvent * WXUNUSED(event),
wxTopLevelWindow *win )
{
win->SetIconizeState(TRUE);
win->SetIconizeState(true);
}
}
@ -704,7 +704,7 @@ wxTopLevelWindowGTK::~wxTopLevelWindowGTK()
{
if (m_grabbed)
{
wxASSERT_MSG( FALSE, _T("Window still grabbed"));
wxASSERT_MSG( false, _T("Window still grabbed"));
RemoveGrab();
}
@ -1130,7 +1130,11 @@ void wxTopLevelWindowGTK::SetTitle( const wxString &title )
{
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
if ( title == m_title )
return;
m_title = title;
gtk_window_set_title( GTK_WINDOW(m_widget), wxGTK_CONV( title ) );
}

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: toplevel.cpp
// Name: src/gtk/toplevel.cpp
// Purpose:
// Author: Robert Roebling
// Id: $Id$
@ -371,7 +371,7 @@ gtk_frame_unmap_callback( GtkWidget * WXUNUSED(widget),
GdkEvent * WXUNUSED(event),
wxTopLevelWindow *win )
{
win->SetIconizeState(TRUE);
win->SetIconizeState(true);
}
}
@ -704,7 +704,7 @@ wxTopLevelWindowGTK::~wxTopLevelWindowGTK()
{
if (m_grabbed)
{
wxASSERT_MSG( FALSE, _T("Window still grabbed"));
wxASSERT_MSG( false, _T("Window still grabbed"));
RemoveGrab();
}
@ -1130,7 +1130,11 @@ void wxTopLevelWindowGTK::SetTitle( const wxString &title )
{
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
if ( title == m_title )
return;
m_title = title;
gtk_window_set_title( GTK_WINDOW(m_widget), wxGTK_CONV( title ) );
}