Get/SetTitle only for wxTopLevelWindow (wxMotif part).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36079 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-11-03 20:58:02 +00:00
parent 7996ff8038
commit 34097680c0
4 changed files with 81 additions and 79 deletions

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////
// Name: window.h
// Name: wx/motif/window.h
// Purpose: wxWindow class
// Author: Julian Smart
// Modified by:
@@ -47,8 +47,8 @@ public:
const wxString& name = wxPanelNameStr);
// implement base class pure virtuals
virtual void SetTitle( const wxString& title);
virtual wxString GetTitle() const;
virtual void SetLabel(const wxString& label);
virtual wxString GetLabel() const;
virtual void Raise();
virtual void Lower();
@@ -325,5 +325,4 @@ protected:
static int ms_count;
};
#endif
// _WX_WINDOW_H_
#endif // _WX_WINDOW_H_

View File

@@ -154,7 +154,9 @@ public:
// return true if the frame is in fullscreen mode
virtual bool IsFullScreen() const = 0;
#ifdef __WXMSW__
#if !defined(__WXMSW__) && \
!defined(__WXMOTIF__)
// FIXME: This is work in progress about moving SetTitle/GetTitle from wxWindow
// to wxTopLevelWindow so initially enabled in wxMSW only to observe results
// and continue on other platforms

View File

@@ -168,7 +168,9 @@ public:
// window attributes
// -----------------
#ifndef __WXMSW__
#if !defined(__WXMSW__) && \
!defined(__WXMOTIF__)
// FIXME: This is work in progress about moving SetTitle/GetTitle from wxWindow
// to wxTopLevelWindow so initially enabled in wxMSW only to observe results
// and continue on other platforms

View File

@@ -632,17 +632,17 @@ void wxWindow::Lower()
XLowerWindow(XtDisplay(wTop), window);
}
void wxWindow::SetTitle(const wxString& title)
void wxWindow::SetLabel(const wxString& label)
{
XtVaSetValues((Widget)GetMainWidget(), XmNtitle, title.c_str(), NULL);
XtVaSetValues((Widget)GetMainWidget(), XmNtitle, label.c_str(), NULL);
}
wxString wxWindow::GetTitle() const
wxString wxWindow::GetLabel() const
{
char *title;
XtVaGetValues((Widget)GetMainWidget(), XmNtitle, &title, NULL);
char *label;
XtVaGetValues((Widget)GetMainWidget(), XmNtitle, &label, NULL);
return wxString(title);
return wxString(label);
}
void wxWindow::DoCaptureMouse()
@@ -852,7 +852,7 @@ void wxWindow::SetScrollbar(int orient, int pos, int thumbVisible,
// Adjusting scrollbars can resize the canvas accidentally
if (newW != oldW || newH != oldH)
SetSize(-1, -1, oldW, oldH);
SetSize(wxDefaultCoord, wxDefaultCoord, oldW, oldH);
}
// Does a physical scroll
@@ -1065,7 +1065,7 @@ void wxWindow::DoSetToolTip(wxToolTip * WXUNUSED(tooltip))
bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
{
if ( x == -1 && y == -1 )
if ( x == wxDefaultCoord && y == wxDefaultCoord )
{
wxPoint mouse = ScreenToClient(wxGetMousePosition());
x = mouse.x; y = mouse.y;
@@ -1262,7 +1262,7 @@ void wxWindow::DoSetSizeIntr(int x, int y, int width, int height,
y = oldY;
}
wxSize size(-1, -1);
wxSize size(wxDefaultSize);
if ( width <= 0 )
{
if ( ( sizeFlags & wxSIZE_AUTO_WIDTH ) && !fromCtor )
@@ -2546,4 +2546,3 @@ wxPoint wxGetMousePosition()
// ----------------------------------------------------------------------------
int wxNoOptimize::ms_count = 0;