mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-12 17:19:10 +01:00
d14efe561b
long become wxWidgets 2.9.2, which in turn is expected to be the last 2.9 release before the 3.0 stable release. Since the full wxWidgets distribution is rather large, I have imported only the parts that we use, on a subdirectory basis: art include/wx/*.* include/wx/aui include/wx/cocoa include/wx/generic include/wx/gtk include/wx/meta include/wx/msw include/wx/osx include/wx/persist include/wx/private include/wx/protocol include/wx/unix src/aui src/common src/generic src/gtk src/msw src/osx src/unix git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7380 8ced0084-cf51-0410-be5f-012b33b47a6e
84 lines
2.8 KiB
C++
84 lines
2.8 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: wx/generic/clrpickerg.h
|
|
// Purpose: wxGenericColourButton header
|
|
// Author: Francesco Montorsi (based on Vadim Zeitlin's code)
|
|
// Modified by:
|
|
// Created: 14/4/2006
|
|
// Copyright: (c) Vadim Zeitlin, Francesco Montorsi
|
|
// RCS-ID: $Id: clrpickerg.h 66615 2011-01-07 05:26:57Z PC $
|
|
// Licence: wxWindows Licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef _WX_CLRPICKER_H_
|
|
#define _WX_CLRPICKER_H_
|
|
|
|
#include "wx/button.h"
|
|
#include "wx/bmpbuttn.h"
|
|
#include "wx/colourdata.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// wxGenericColourButton: a button which brings up a wxColourDialog
|
|
//-----------------------------------------------------------------------------
|
|
|
|
class WXDLLIMPEXP_CORE wxGenericColourButton : public wxBitmapButton,
|
|
public wxColourPickerWidgetBase
|
|
{
|
|
public:
|
|
wxGenericColourButton() {}
|
|
wxGenericColourButton(wxWindow *parent,
|
|
wxWindowID id,
|
|
const wxColour& col = *wxBLACK,
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
const wxSize& size = wxDefaultSize,
|
|
long style = wxCLRBTN_DEFAULT_STYLE,
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
const wxString& name = wxColourPickerWidgetNameStr)
|
|
{
|
|
Create(parent, id, col, pos, size, style, validator, name);
|
|
}
|
|
|
|
virtual ~wxGenericColourButton() {}
|
|
|
|
|
|
public: // API extensions specific for wxGenericColourButton
|
|
|
|
// user can override this to init colour data in a different way
|
|
virtual void InitColourData();
|
|
|
|
// returns the colour data shown in wxColourDialog
|
|
wxColourData *GetColourData() { return &ms_data; }
|
|
|
|
|
|
public:
|
|
|
|
bool Create(wxWindow *parent,
|
|
wxWindowID id,
|
|
const wxColour& col = *wxBLACK,
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
const wxSize& size = wxDefaultSize,
|
|
long style = wxCLRBTN_DEFAULT_STYLE,
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
const wxString& name = wxColourPickerWidgetNameStr);
|
|
|
|
void OnButtonClick(wxCommandEvent &);
|
|
|
|
|
|
protected:
|
|
wxBitmap m_bitmap;
|
|
|
|
wxSize DoGetBestSize() const;
|
|
|
|
void UpdateColour();
|
|
|
|
// the colour data shown in wxColourPickerCtrlGeneric
|
|
// controls. This member is static so that all colour pickers
|
|
// in the program share the same set of custom colours.
|
|
static wxColourData ms_data;
|
|
|
|
private:
|
|
DECLARE_DYNAMIC_CLASS(wxGenericColourButton)
|
|
};
|
|
|
|
|
|
#endif // _WX_CLRPICKER_H_
|