]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/bmpbuttn.h
Further performance optimizations
[wxWidgets.git] / include / wx / palmos / bmpbuttn.h
CommitLineData
ffecfa5a 1/////////////////////////////////////////////////////////////////////////////
e1d63b79 2// Name: wx/palmos/bmpbuttn.h
ffecfa5a 3// Purpose: wxBitmapButton class
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_BMPBUTTN_H_
13#define _WX_BMPBUTTN_H_
14
ffecfa5a
JS
15#include "wx/button.h"
16#include "wx/bitmap.h"
17
18#define wxDEFAULT_BUTTON_MARGIN 4
19
53a2db12 20class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
ffecfa5a
JS
21{
22public:
23 wxBitmapButton()
24 { m_marginX = m_marginY = wxDEFAULT_BUTTON_MARGIN; }
25 wxBitmapButton(wxWindow *parent,
26 wxWindowID id,
27 const wxBitmap& bitmap,
28 const wxPoint& pos = wxDefaultPosition,
29 const wxSize& size = wxDefaultSize,
30 long style = wxBU_AUTODRAW,
31 const wxValidator& validator = wxDefaultValidator,
32 const wxString& name = wxButtonNameStr)
33 {
34 Create(parent, id, bitmap, pos, size, style, validator, name);
35 }
36
37 bool Create(wxWindow *parent,
38 wxWindowID id,
39 const wxBitmap& bitmap,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = wxBU_AUTODRAW,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxButtonNameStr);
45
46 // Implementation
ffecfa5a
JS
47 virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel );
48 virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel );
49 virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg );
50
51protected:
52 virtual wxSize DoGetBestSize() const;
5445a26c 53
ffecfa5a
JS
54private:
55 DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton)
56};
57
58#endif
59 // _WX_BMPBUTTN_H_