initial commit
Signed-off-by: Peter Siegmund <mars3142@noreply.mars3142.dev>
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/generic/private/addremovectrl.h
|
||||
// Purpose: Generic wxAddRemoveImpl implementation, also used in wxMSW
|
||||
// Author: Vadim Zeitlin
|
||||
// Created: 2015-02-05
|
||||
// Copyright: (c) 2015 Vadim Zeitlin <vadim@wxwidgets.org>
|
||||
// Licence: wxWindows licence
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_GENERIC_PRIVATE_ADDREMOVECTRL_H_
|
||||
#define _WX_GENERIC_PRIVATE_ADDREMOVECTRL_H_
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxAddRemoveImpl
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class wxAddRemoveImpl : public wxAddRemoveImplWithButtons
|
||||
{
|
||||
public:
|
||||
wxAddRemoveImpl(wxAddRemoveAdaptor* adaptor,
|
||||
wxAddRemoveCtrl* parent,
|
||||
wxWindow* ctrlItems)
|
||||
: wxAddRemoveImplWithButtons(adaptor, parent, ctrlItems)
|
||||
{
|
||||
m_btnAdd = new wxButton(parent, wxID_ADD, GetAddButtonLabel(),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxBU_EXACTFIT | wxBORDER_NONE);
|
||||
m_btnRemove = new wxButton(parent, wxID_REMOVE, GetRemoveButtonLabel(),
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxBU_EXACTFIT | wxBORDER_NONE);
|
||||
|
||||
wxSizer* const sizerBtns = new wxBoxSizer(wxVERTICAL);
|
||||
sizerBtns->Add(m_btnAdd, wxSizerFlags().Expand());
|
||||
sizerBtns->Add(m_btnRemove, wxSizerFlags().Expand());
|
||||
|
||||
wxSizer* const sizerTop = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizerTop->Add(ctrlItems, wxSizerFlags(1).Expand());
|
||||
sizerTop->Add(sizerBtns, wxSizerFlags().Centre().Border(wxLEFT));
|
||||
parent->SetSizer(sizerTop);
|
||||
|
||||
SetUpEvents();
|
||||
}
|
||||
|
||||
private:
|
||||
static wxString GetAddButtonLabel()
|
||||
{
|
||||
return wchar_t(0xFF0B); // FULLWIDTH PLUS SIGN
|
||||
}
|
||||
|
||||
static wxString GetRemoveButtonLabel()
|
||||
{
|
||||
return wchar_t(0x2012); // FIGURE DASH
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // _WX_GENERIC_PRIVATE_ADDREMOVECTRL_H_
|
||||
Reference in New Issue
Block a user