added missing methods/removed duplicated base methods

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot 2001-08-12 15:43:02 +00:00
parent a99c96b0ff
commit d062e17fca
7 changed files with 26 additions and 31 deletions

View File

@ -64,7 +64,6 @@ public:
virtual void Iconize(bool iconize = TRUE);
virtual bool IsIconized() const;
virtual void Restore();
virtual void SetMenuBar(wxMenuBar *menubar);
virtual void SetIcon(const wxIcon& icon);
// implementation only from now on

View File

@ -29,9 +29,9 @@ public:
// Copy constructors
inline wxIcon(const wxIcon& icon) { Ref(icon); }
wxIcon( const char **data );
wxIcon( char **data );
wxIcon(const char bits[], int width, int height);
wxIcon(const char **data);
wxIcon(char **data);
wxIcon(const char bits[], int width=-1, int height=-1);
wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICON_RESOURCE,
int desiredWidth = -1, int desiredHeight = -1);
~wxIcon();
@ -44,6 +44,11 @@ public:
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }
inline bool operator == (const wxIcon& icon) { return m_refData == icon.m_refData; }
inline bool operator != (const wxIcon& icon) { return m_refData != icon.m_refData; }
// create from bitmap (which should have a mask unless it's monochrome):
// there shouldn't be any implicit bitmap -> icon conversion (i.e. no
// ctors, assignment operators...), but it's ok to have such function
void CopyFromBitmap(const wxBitmap& bmp);
};
/*

View File

@ -56,6 +56,9 @@ public:
virtual void Check(bool bDoCheck = TRUE);
virtual bool IsChecked() const;
virtual void SetBitmap(const wxBitmap& bitmap) { m_bitmap = bitmap; }
virtual const wxBitmap& GetBitmap() const { return m_bitmap; }
#if wxUSE_ACCEL
virtual wxAcceleratorEntry *GetAccel() const;
#endif // wxUSE_ACCEL
@ -69,9 +72,11 @@ public:
// menu handle depending on what we're
int GetRealId() const;
static int MacBuildMenuString(StringPtr outMacItemText, SInt16 *outMacShortcutChar , UInt8 *outMacModifiers , const char *inItemName , bool useShortcuts ) ;
static int MacBuildMenuString(StringPtr outMacItemText, SInt16 *outMacShortcutChar , UInt8 *outMacModifiers , const char *inItemName , bool useShortcuts ) ;
private:
wxBitmap m_bitmap; // Bitmap for menuitem, if any
DECLARE_DYNAMIC_CLASS(wxMenuItem)
};

View File

@ -225,19 +225,6 @@ void wxFrameMac::PositionStatusBar()
}
}
void wxFrameMac::SetMenuBar(wxMenuBar *menuBar)
{
if (!menuBar)
{
return;
}
m_frameMenuBar = menuBar;
// m_frameMenuBar->MacInstallMenuBar() ;
m_frameMenuBar->Attach((wxFrame *)this);
}
// Responds to colour changes, and passes event on to children.
void wxFrameMac::OnSysColourChanged(wxSysColourChangedEvent& event)
{

View File

@ -69,6 +69,12 @@ bool wxIcon::LoadFile(const wxString& filename, long type,
return FALSE;
}
void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
{
wxIcon *icon = (wxIcon*)(&bmp);
*this = *icon;
}
IMPLEMENT_DYNAMIC_CLASS(wxICONResourceHandler, wxBitmapHandler)
bool wxICONResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,

View File

@ -225,19 +225,6 @@ void wxFrameMac::PositionStatusBar()
}
}
void wxFrameMac::SetMenuBar(wxMenuBar *menuBar)
{
if (!menuBar)
{
return;
}
m_frameMenuBar = menuBar;
// m_frameMenuBar->MacInstallMenuBar() ;
m_frameMenuBar->Attach((wxFrame *)this);
}
// Responds to colour changes, and passes event on to children.
void wxFrameMac::OnSysColourChanged(wxSysColourChangedEvent& event)
{

View File

@ -69,6 +69,12 @@ bool wxIcon::LoadFile(const wxString& filename, long type,
return FALSE;
}
void wxIcon::CopyFromBitmap(const wxBitmap& bmp)
{
wxIcon *icon = (wxIcon*)(&bmp);
*this = *icon;
}
IMPLEMENT_DYNAMIC_CLASS(wxICONResourceHandler, wxBitmapHandler)
bool wxICONResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,