Get/SetTitle only for wxTopLevelWindow (wxOS2 part).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: control.h
|
||||
// Name: wx/os2/control.h
|
||||
// Purpose: wxControl class
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
@@ -30,14 +30,7 @@ public:
|
||||
,const wxString& rsName = wxControlNameStr
|
||||
)
|
||||
{
|
||||
Create( pParent
|
||||
,vId
|
||||
,rPos
|
||||
,rSize
|
||||
,lStyle
|
||||
,rValidator
|
||||
,rsName
|
||||
);
|
||||
Create( pParent, vId, rPos, rSize, lStyle, rValidator, rsName );
|
||||
}
|
||||
virtual ~wxControl();
|
||||
|
||||
@@ -51,6 +44,7 @@ public:
|
||||
);
|
||||
|
||||
virtual void SetLabel(const wxString& rsLabel);
|
||||
virtual wxString GetLabel() const { return m_label; }
|
||||
|
||||
//
|
||||
// Simulates an event
|
||||
@@ -70,7 +64,7 @@ public:
|
||||
//
|
||||
// For ownerdraw items
|
||||
//
|
||||
virtual bool OS2OnDraw(WXDRAWITEMSTRUCT* WXUNUSED(pItem)) { return FALSE; };
|
||||
virtual bool OS2OnDraw(WXDRAWITEMSTRUCT* WXUNUSED(pItem)) { return false; };
|
||||
virtual long OS2OnMeasure(WXMEASUREITEMSTRUCT* WXUNUSED(pItem)) { return 0L; };
|
||||
|
||||
wxArrayLong& GetSubcontrols() { return m_aSubControls; }
|
||||
@@ -101,7 +95,7 @@ public:
|
||||
,long lStyle
|
||||
);
|
||||
//
|
||||
// Create the control of the given class with the given style, returns FALSE
|
||||
// Create the control of the given class with the given style, returns false
|
||||
// if creation failed.
|
||||
//
|
||||
bool OS2CreateControl( const wxChar* zClassname
|
||||
@@ -125,10 +119,12 @@ public:
|
||||
inline void SetYComp(const int nYComp) {m_nYComp = nYComp;}
|
||||
|
||||
private:
|
||||
int m_nXComp;
|
||||
int m_nYComp;
|
||||
DECLARE_EVENT_TABLE()
|
||||
int m_nXComp;
|
||||
int m_nYComp;
|
||||
|
||||
wxString m_label;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
}; // end of wxControl
|
||||
|
||||
#endif // _WX_CONTROL_H_
|
||||
|
||||
|
@@ -158,16 +158,16 @@ public:
|
||||
virtual void SetString( int nNum
|
||||
,const wxString& rsLabel
|
||||
);
|
||||
virtual bool SetStringSelection(const wxString& rsStr);
|
||||
virtual bool SetStringSelection(const wxString& rsStr);
|
||||
|
||||
void SetLabel( int nItem
|
||||
,const wxString& rsLabel
|
||||
);
|
||||
void SetLabel( int item
|
||||
,wxBitmap* pBitmap
|
||||
);
|
||||
wxString GetLabel(int nItem) const;
|
||||
virtual void SetLabel(const wxString& rsLabel)
|
||||
{ wxControl::SetLabel(rsLabel); }
|
||||
virtual wxString GetLabel() const
|
||||
{ return wxControl::GetLabel(); }
|
||||
|
||||
void SetLabel( int nItem, const wxString& rsLabel );
|
||||
void SetLabel( int item, wxBitmap* pBitmap );
|
||||
wxString GetLabel(int nItem) const;
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize(void) const;
|
||||
@@ -177,28 +177,23 @@ protected:
|
||||
,int nHeight
|
||||
,int nSizeFlags = wxSIZE_AUTO
|
||||
);
|
||||
wxSize GetMaxButtonSize(void) const;
|
||||
wxSize GetTotalButtonSize(const wxSize& rSizeBtn) const;
|
||||
void SubclassRadioButton(WXHWND hWndBtn);
|
||||
wxSize GetMaxButtonSize(void) const;
|
||||
wxSize GetTotalButtonSize(const wxSize& rSizeBtn) const;
|
||||
void SubclassRadioButton(WXHWND hWndBtn);
|
||||
|
||||
|
||||
WXHWND* m_ahRadioButtons;
|
||||
int m_nMajorDim ;
|
||||
int* m_pnRadioWidth; // for bitmaps
|
||||
int* m_pnRadioHeight;
|
||||
int m_nNoItems;
|
||||
int m_nNoRowsOrCols;
|
||||
int m_nSelectedButton;
|
||||
int m_nSizeFlags;
|
||||
WXHWND* m_ahRadioButtons;
|
||||
int m_nMajorDim ;
|
||||
int* m_pnRadioWidth; // for bitmaps
|
||||
int* m_pnRadioHeight;
|
||||
int m_nNoItems;
|
||||
int m_nNoRowsOrCols;
|
||||
int m_nSelectedButton;
|
||||
int m_nSizeFlags;
|
||||
|
||||
private:
|
||||
inline wxString GetLabel() const
|
||||
{ return wxWindowBase::GetLabel(); }
|
||||
inline void SetLabel(const wxString& rsLabel)
|
||||
{ wxWindowBase::SetLabel(rsLabel); }
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxRadioBox)
|
||||
}; // end of wxRadioBox
|
||||
|
||||
#endif
|
||||
// _WX_RADIOBOX_H_
|
||||
#endif // _WX_RADIOBOX_H_
|
||||
|
@@ -1,6 +1,6 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/msw/toplevel.h
|
||||
// Purpose: wxTopLevelWindowMSW is the MSW implementation of wxTLW
|
||||
// Name: wx/os2/toplevel.h
|
||||
// Purpose: wxTopLevelWindowOS2 is the OS2 implementation of wxTLW
|
||||
// Author: Vadim Zeitlin
|
||||
// Modified by:
|
||||
// Created: 20.09.01
|
||||
@@ -12,10 +12,12 @@
|
||||
#ifndef _WX_MSW_TOPLEVEL_H_
|
||||
#define _WX_MSW_TOPLEVEL_H_
|
||||
|
||||
enum ETemplateID { kResizeableDialog = 130
|
||||
,kCaptionDialog
|
||||
,kNoCaptionDialog
|
||||
};
|
||||
enum ETemplateID
|
||||
{
|
||||
kResizeableDialog = 130,
|
||||
kCaptionDialog,
|
||||
kNoCaptionDialog
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTopLevelWindowOS2
|
||||
@@ -55,46 +57,50 @@ public:
|
||||
//
|
||||
// Implement base class pure virtuals
|
||||
//
|
||||
virtual void Iconize(bool bIconize = TRUE);
|
||||
inline virtual bool IsFullScreen(void) const { return m_bFsIsShowing; }
|
||||
virtual bool IsIconized(void) const;
|
||||
virtual bool IsMaximized(void) const;
|
||||
virtual void Maximize(bool bMaximize = TRUE);
|
||||
virtual void Restore(void);
|
||||
virtual void SendSizeEvent(void);
|
||||
virtual void SetIcon(const wxIcon& rIcon);
|
||||
virtual void SetIcons(const wxIconBundle& rIcons);
|
||||
virtual void SetTitle( const wxString& title);
|
||||
virtual wxString GetTitle() const;
|
||||
|
||||
virtual bool Show(bool bShow = TRUE);
|
||||
virtual bool ShowFullScreen( bool bShow
|
||||
,long lStyle = wxFULLSCREEN_ALL
|
||||
);
|
||||
virtual void Iconize(bool bIconize = true);
|
||||
virtual bool IsFullScreen(void) const { return m_bFsIsShowing; }
|
||||
virtual bool IsIconized(void) const;
|
||||
virtual bool IsMaximized(void) const;
|
||||
virtual void Maximize(bool bMaximize = true);
|
||||
virtual void Restore(void);
|
||||
virtual void SendSizeEvent(void);
|
||||
virtual void SetIcon(const wxIcon& rIcon);
|
||||
virtual void SetIcons(const wxIconBundle& rIcons);
|
||||
|
||||
virtual bool Show(bool bShow = true);
|
||||
virtual bool ShowFullScreen( bool bShow,
|
||||
long lStyle = wxFULLSCREEN_ALL );
|
||||
|
||||
//
|
||||
// EnableCloseButton(FALSE) may be used to remove the "Close"
|
||||
// EnableCloseButton(false) may be used to remove the "Close"
|
||||
// button from the title bar
|
||||
//
|
||||
bool EnableCloseButton(bool bEnable = TRUE);
|
||||
HWND GetFrame(void) const { return m_hFrame; }
|
||||
bool EnableCloseButton(bool bEnable = true);
|
||||
HWND GetFrame(void) const { return m_hFrame; }
|
||||
|
||||
//
|
||||
// Implementation from now on
|
||||
// --------------------------
|
||||
//
|
||||
PSWP GetSwpClient(void) { return &m_vSwpClient; }
|
||||
PSWP GetSwpClient(void) { return &m_vSwpClient; }
|
||||
|
||||
void OnActivate(wxActivateEvent& rEvent);
|
||||
void OnActivate(wxActivateEvent& rEvent);
|
||||
|
||||
void SetLastFocus(wxWindow *pWin) { m_pWinLastFocused = pWin; }
|
||||
wxWindow* GetLastFocus(void) const { return m_pWinLastFocused; }
|
||||
|
||||
void SetLastFocus(wxWindow *pWin) { m_pWinLastFocused = pWin; }
|
||||
wxWindow* GetLastFocus(void) const { return m_pWinLastFocused; }
|
||||
protected:
|
||||
|
||||
//
|
||||
// Common part of all ctors
|
||||
//
|
||||
void Init(void);
|
||||
|
||||
//
|
||||
// Create a new frame, return FALSE if it couldn't be created
|
||||
// Create a new frame, return false if it couldn't be created
|
||||
//
|
||||
bool CreateFrame( const wxString& rsTitle
|
||||
,const wxPoint& rPos
|
||||
@@ -103,7 +109,7 @@ protected:
|
||||
|
||||
//
|
||||
// Create a new dialog using the given dialog template from resources,
|
||||
// return FALSE if it couldn't be created
|
||||
// return false if it couldn't be created
|
||||
//
|
||||
bool CreateDialog( ULONG ulDlgTemplate
|
||||
,const wxString& rsTitle
|
||||
@@ -141,33 +147,32 @@ protected:
|
||||
//
|
||||
// Is the frame currently iconized?
|
||||
//
|
||||
bool m_bIconized;
|
||||
bool m_bIconized;
|
||||
|
||||
//
|
||||
// Should the frame be maximized when it will be shown? set by Maximize()
|
||||
// when it is called while the frame is hidden
|
||||
//
|
||||
bool m_bMaximizeOnShow;
|
||||
bool m_bMaximizeOnShow;
|
||||
|
||||
//
|
||||
// Data to save/restore when calling ShowFullScreen
|
||||
//
|
||||
long m_lFsStyle; // Passed to ShowFullScreen
|
||||
wxRect m_vFsOldSize;
|
||||
long m_lFsOldWindowStyle;
|
||||
bool m_bFsIsMaximized;
|
||||
bool m_bFsIsShowing;
|
||||
long m_lFsStyle; // Passed to ShowFullScreen
|
||||
wxRect m_vFsOldSize;
|
||||
long m_lFsOldWindowStyle;
|
||||
bool m_bFsIsMaximized;
|
||||
bool m_bFsIsShowing;
|
||||
|
||||
wxWindow* m_pWinLastFocused;
|
||||
wxWindow* m_pWinLastFocused;
|
||||
|
||||
WXHWND m_hFrame;
|
||||
SWP m_vSwp;
|
||||
SWP m_vSwpClient;
|
||||
static bool m_sbInitialized;
|
||||
static wxWindow* m_spHiddenParent;
|
||||
WXHWND m_hFrame;
|
||||
SWP m_vSwp;
|
||||
SWP m_vSwpClient;
|
||||
static bool m_sbInitialized;
|
||||
static wxWindow* m_spHiddenParent;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
}; // end of CLASS wxTopLevelWindowOS2
|
||||
|
||||
#endif // _WX_MSW_TOPLEVEL_H_
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: window.h
|
||||
// Name: wx/os2/window.h
|
||||
// Purpose: wxWindow class
|
||||
// Author: David Webster
|
||||
// Modified by:
|
||||
@@ -90,8 +90,8 @@ public:
|
||||
);
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual void SetTitle(const wxString& rTitle);
|
||||
virtual wxString GetTitle(void) const;
|
||||
virtual void SetLabel(const wxString& label);
|
||||
virtual wxString GetLabel(void) const;
|
||||
virtual void Raise(void);
|
||||
virtual void Lower(void);
|
||||
virtual bool Show(bool bShow = true);
|
||||
@@ -587,5 +587,4 @@ WX_DECLARE_HASH(wxWindowOS2, wxWindowList, wxWinHashTable);
|
||||
|
||||
extern wxWinHashTable *wxWinHandleHash;
|
||||
|
||||
#endif
|
||||
// _WX_WINDOW_H_
|
||||
#endif // _WX_WINDOW_H_
|
||||
|
Reference in New Issue
Block a user