95 lines
3.4 KiB
C
95 lines
3.4 KiB
C
/*
|
|
{{copyright}}
|
|
*/
|
|
|
|
/*
|
|
{{version}}
|
|
*/
|
|
|
|
/*
|
|
{{license}}
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <wx/statline.h>
|
|
#include <wx/wx.h>
|
|
|
|
//--------------------------------------------------------------
|
|
inline wxStaticText *createTitleCtrl(wxWindow *parentWindow, const wxString &title, const long style = 0)
|
|
{
|
|
const auto ctrl = new wxStaticText(parentWindow,
|
|
wxID_ANY,
|
|
title,
|
|
wxDefaultPosition,
|
|
wxDefaultSize,
|
|
style);
|
|
ctrl->SetFont(ctrl->GetFont().Italic());
|
|
return ctrl;
|
|
}
|
|
//--------------------------------------------------------------
|
|
inline wxStaticText *createLabelCtrl(wxWindow *parentWindow, const wxString &title = wxEmptyString, const long style = 0)
|
|
{
|
|
const auto ctrl = new wxStaticText(parentWindow,
|
|
wxID_ANY,
|
|
title,
|
|
wxDefaultPosition,
|
|
wxDefaultSize,
|
|
style);
|
|
return ctrl;
|
|
}
|
|
//--------------------------------------------------------------
|
|
inline wxTextCtrl *createTextCtrl(wxWindow *parentWindow, const wxString &value = wxEmptyString, const long style = 0)
|
|
{
|
|
const auto ctrl = new wxTextCtrl(parentWindow,
|
|
wxID_ANY,
|
|
value,
|
|
wxDefaultPosition,
|
|
wxDefaultSize,
|
|
style);
|
|
return ctrl;
|
|
}
|
|
//--------------------------------------------------------------
|
|
inline wxButton *createButtonCtrl(wxWindow *parentWindow, const wxString &label, const long style = 0)
|
|
{
|
|
const auto ctrl = new wxButton(parentWindow,
|
|
wxID_ANY,
|
|
label,
|
|
wxDefaultPosition,
|
|
wxDefaultSize,
|
|
style);
|
|
return ctrl;
|
|
}
|
|
//--------------------------------------------------------------
|
|
inline wxBitmapButton *createBitmapButtonCtrl(wxWindow *parentWindow, const wxBitmap &bmp, const long style = 0)
|
|
{
|
|
const auto ctrl = new wxBitmapButton(parentWindow,
|
|
wxID_ANY,
|
|
bmp,
|
|
wxDefaultPosition,
|
|
wxDefaultSize,
|
|
style);
|
|
return ctrl;
|
|
}
|
|
//--------------------------------------------------------------
|
|
inline wxStaticLine *createVLineCtrl(wxWindow *parentWindow)
|
|
{
|
|
const auto ctrl = new wxStaticLine(parentWindow,
|
|
wxID_ANY,
|
|
wxDefaultPosition,
|
|
wxDefaultSize,
|
|
wxVERTICAL);
|
|
return ctrl;
|
|
}
|
|
//--------------------------------------------------------------
|
|
inline wxStaticLine *createHLineCtrl(wxWindow *parentWindow)
|
|
{
|
|
const auto ctrl = new wxStaticLine(parentWindow,
|
|
wxID_ANY,
|
|
wxDefaultPosition,
|
|
wxDefaultSize,
|
|
wxHORIZONTAL);
|
|
return ctrl;
|
|
}
|
|
//--------------------------------------------------------------
|