]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/bmpbuttn.h
more tweaks to drop down arrow drawing (Andreas Pflug)
[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
15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16#pragma interface "bmpbuttn.h"
17#endif
18
19#include "wx/button.h"
20#include "wx/bitmap.h"
21
22#define wxDEFAULT_BUTTON_MARGIN 4
23
24class WXDLLEXPORT wxBitmapButton: public wxBitmapButtonBase
25{
26public:
27 wxBitmapButton()
28 { m_marginX = m_marginY = wxDEFAULT_BUTTON_MARGIN; }
29 wxBitmapButton(wxWindow *parent,
30 wxWindowID id,
31 const wxBitmap& bitmap,
32 const wxPoint& pos = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 long style = wxBU_AUTODRAW,
35 const wxValidator& validator = wxDefaultValidator,
36 const wxString& name = wxButtonNameStr)
37 {
38 Create(parent, id, bitmap, pos, size, style, validator, name);
39 }
40
41 bool Create(wxWindow *parent,
42 wxWindowID id,
43 const wxBitmap& bitmap,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = wxBU_AUTODRAW,
47 const wxValidator& validator = wxDefaultValidator,
48 const wxString& name = wxButtonNameStr);
49
50 // Implementation
51 virtual void SetDefault();
ffecfa5a
JS
52 virtual void DrawFace( WXHDC dc, int left, int top, int right, int bottom, bool sel );
53 virtual void DrawButtonFocus( WXHDC dc, int left, int top, int right, int bottom, bool sel );
54 virtual void DrawButtonDisable( WXHDC dc, int left, int top, int right, int bottom, bool with_marg );
55
56protected:
57 virtual wxSize DoGetBestSize() const;
5445a26c 58
ffecfa5a
JS
59private:
60 DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton)
61};
62
63#endif
64 // _WX_BMPBUTTN_H_