]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/statbmp.h
added wxRect::GetTopRight/BottomLeft() for consistency with the existing GetTopLeft...
[wxWidgets.git] / include / wx / mac / carbon / statbmp.h
CommitLineData
8cf73271
SC
1/////////////////////////////////////////////////////////////////////////////
2// Name: statbmp.h
3// Purpose: wxStaticBitmap class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
65571936 9// Licence: wxWindows licence
8cf73271
SC
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_STATBMP_H_
13#define _WX_STATBMP_H_
14
8cf73271
SC
15#include "wx/icon.h"
16
17class WXDLLEXPORT wxStaticBitmap: public wxStaticBitmapBase
18{
19 DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
20 public:
20b69855 21 wxStaticBitmap() { }
8cf73271 22
20b69855 23 wxStaticBitmap(wxWindow *parent, wxWindowID id,
8cf73271
SC
24 const wxBitmap& label,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize,
27 long style = 0,
28 const wxString& name = wxStaticBitmapNameStr)
29 {
30 Create(parent, id, label, pos, size, style, name);
31 }
32
33 bool Create(wxWindow *parent, wxWindowID id,
34 const wxBitmap& label,
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize,
37 long style = 0,
38 const wxString& name = wxStaticBitmapNameStr);
39
40 virtual void SetBitmap(const wxBitmap& bitmap);
41
42 virtual void Command(wxCommandEvent& WXUNUSED(event)) {};
43 virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {};
44 void OnPaint( wxPaintEvent &event ) ;
45
46 wxBitmap GetBitmap() const { return m_bitmap; }
47 wxIcon GetIcon() const
48 {
49 // icons and bitmaps are really the same thing in wxMac
50 return (const wxIcon &)m_bitmap;
51 }
52 void SetIcon(const wxIcon& icon) { SetBitmap( (const wxBitmap &)icon ) ; }
53
54 // overriden base class virtuals
55 virtual bool AcceptsFocus() const { return FALSE; }
8cf73271
SC
56
57 protected:
6f02a879
VZ
58 virtual wxSize DoGetBestSize() const;
59
20b69855 60 wxBitmap m_bitmap;
8cf73271
SC
61 DECLARE_EVENT_TABLE()
62};
63
64#endif
65 // _WX_STATBMP_H_