]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/bmpbuttn.h
added wxRTTI macros to stream classes (patch 1687073)
[wxWidgets.git] / include / wx / msw / bmpbuttn.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
a30ccc2d 2// Name: wx/msw/bmpbuttn.h
2bda0e17
KB
3// Purpose: wxBitmapButton class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_BMPBUTTN_H_
13#define _WX_BMPBUTTN_H_
2bda0e17 14
2bda0e17 15#include "wx/button.h"
1e7215e6 16#include "wx/bitmap.h"
a6c255cb 17#include "wx/brush.h"
2bda0e17 18
1fdc16ad 19class WXDLLEXPORT wxBitmapButton : public wxBitmapButtonBase
2bda0e17 20{
0655ad29 21public:
a30ccc2d
VZ
22 wxBitmapButton() { }
23
1e6feb95
VZ
24 wxBitmapButton(wxWindow *parent,
25 wxWindowID id,
26 const wxBitmap& bitmap,
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize,
29 long style = wxBU_AUTODRAW,
30 const wxValidator& validator = wxDefaultValidator,
31 const wxString& name = wxButtonNameStr)
0655ad29
VZ
32 {
33 Create(parent, id, bitmap, pos, size, style, validator, name);
34 }
35
1e6feb95
VZ
36 bool Create(wxWindow *parent,
37 wxWindowID id,
38 const wxBitmap& bitmap,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
41 long style = wxBU_AUTODRAW,
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxButtonNameStr);
2bda0e17 44
0655ad29 45 // Implementation
d50dbf7c 46 virtual bool SetBackgroundColour(const wxColour& colour);
0655ad29
VZ
47 virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);
48 virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel );
49 virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel );
50 virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg );
51
c046274e 52protected:
7996ff80 53 // reimplement some base class virtuals
c046274e 54 virtual wxSize DoGetBestSize() const;
7996ff80 55 virtual void OnSetBitmap();
fcf90ee1 56
a6fd0fde
VZ
57 // invalidate m_brushDisabled when system colours change
58 void OnSysColourChanged(wxSysColourChangedEvent& event);
59
1fdc16ad
VZ
60 // change the currently bitmap if we have a hover one
61 void OnMouseEnterOrLeave(wxMouseEvent& event);
62
a6fd0fde
VZ
63
64 // the brush we use to draw disabled buttons
d50dbf7c
VZ
65 wxBrush m_brushDisabled;
66
a6fd0fde
VZ
67
68 DECLARE_EVENT_TABLE()
fc7a2a60 69 DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton)
2bda0e17
KB
70};
71
1fdc16ad 72#endif // _WX_BMPBUTTN_H_