Find file
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (39 sloc) 1.32 KB
* Copyright (C) 2009, Alexander Stigsen,
* This software is licensed under the Open Company License as described
* in the file license.txt, which you should have received as part of this
* distribution. The terms are also available at
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
#ifndef __CLOSEBUTTON_H__
#define __CLOSEBUTTON_H__
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include <wx/wx.h>
class CloseButton : public wxControl {
CloseButton(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition);
void SetAcceptFocus(bool do_accept);
void Init();
void DrawButton(wxDC& dc);
// event handlers
void OnEraseBackground(wxEraseEvent& event);
void OnPaint(wxPaintEvent& event);
void OnBitmapButton(wxCommandEvent& evt);
void OnSetFocus(wxFocusEvent &event);
void OnMouseEvent(wxMouseEvent& event);
void OnSysColourChanged(wxSysColourChangedEvent& event);
// member variables
wxBitmapButton *m_bitmapButton;
int m_state;
bool m_acceptFocus;
#endif // __CLOSEBUTTON_H__