misc minor fixes I forgot to commit before

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-06-28 22:06:24 +00:00
parent 6c582c35b9
commit c35414dbe4
6 changed files with 185 additions and 195 deletions

View File

@@ -67,7 +67,12 @@ public:
const wxBitmap& GetBitmap() const { return m_bitmap; }
// for compatibility with wxMSW
wxIcon& GetIcon();
const wxIcon& GetIcon() const
{
// don't use wxDynamicCast, icons and bitmaps are really the same thing
// in wxGTK
return (const wxIcon &)m_bitmap;
}
private:
wxBitmap m_bitmap;

View File

@@ -67,7 +67,12 @@ public:
const wxBitmap& GetBitmap() const { return m_bitmap; }
// for compatibility with wxMSW
wxIcon& GetIcon();
const wxIcon& GetIcon() const
{
// don't use wxDynamicCast, icons and bitmaps are really the same thing
// in wxGTK
return (const wxIcon &)m_bitmap;
}
private:
wxBitmap m_bitmap;

View File

@@ -166,8 +166,6 @@ int wxGenericFontDialog::ShowModal(void)
void wxGenericFontDialog::OnPaint(wxPaintEvent& event)
{
wxDialog::OnPaint(event);
wxPaintDC dc(this);
PaintFontBackground(dc);
PaintFont(dc);

View File

@@ -83,13 +83,4 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
}
}
wxIcon& wxStaticBitmap::GetIcon()
{
wxIcon *icon = wxDynamicCast(&m_bitmap, wxIcon);
if (!icon) return wxNullIcon;
return *icon;
}
#endif

View File

@@ -83,13 +83,4 @@ void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
}
}
wxIcon& wxStaticBitmap::GetIcon()
{
wxIcon *icon = wxDynamicCast(&m_bitmap, wxIcon);
if (!icon) return wxNullIcon;
return *icon;
}
#endif