Ejemplo n.º 1
0
void SDesignerToolBar::Construct( const FArguments& InArgs )
{
	CommandList = InArgs._CommandList;

	ChildSlot
	[
		MakeToolBar(InArgs._Extenders)
	];

	SViewportToolBar::Construct(SViewportToolBar::FArguments());
}
Ejemplo n.º 2
0
///Constructor for a ToolBarMiniFrame. You give it a type and
///It will create a toolbar of that type inside the frame.
ToolBarMiniFrame::ToolBarMiniFrame(wxWindow * parent, enum ToolBarType tbt)
   : wxMiniFrame(gParentWindow, -1, "", wxPoint(1, 1),
                 wxSize(20, 20),
                 wxMINIMIZE_BOX | wxCAPTION
                 | ((parent == NULL)?0x0:wxFRAME_FLOAT_ON_PARENT))
{
   mToolBar = MakeToolBar(tbt, this);
   SetTitle(mToolBar->GetTitle());
   SetSize(wxSize(mToolBar->GetSize().x,
                  mToolBar->GetSize().y + TOOLBAR_HEIGHT_OFFSET));
}
Ejemplo n.º 3
0
MainWindow::MainWindow() : QMainWindow(nullptr)
{
	setWindowTitle(tr("Dolphin"));
	setWindowIcon(QIcon(Resources::GetMisc(Resources::LOGO_SMALL)));

	MakeGameList();
	MakeToolBar();
	MakeRenderWidget();
	MakeStack();
	MakeMenuBar();
}
Ejemplo n.º 4
0
///Constructor for a ToolBarFullFrame. You give it a type and
///It will create a toolbar of that type inside the frame.
ToolBarFullFrame::ToolBarFullFrame(wxWindow * parent, enum ToolBarType tbt)
   : wxFrame(gParentWindow, -1, "", wxPoint(1, 1),
             wxSize(20, 20),
             wxMINIMIZE_BOX | wxCAPTION
             | wxRESIZE_BORDER
             | ((parent == NULL)?0x0:wxFRAME_FLOAT_ON_PARENT))
{
   mToolBar = MakeToolBar(tbt, this);
   SetTitle(mToolBar->GetTitle());

   // This is a hack for now
   if (tbt == MeterToolBarID)
      SetSize(300, 150);
   else
      SetSize(wxSize(mToolBar->GetSize().x,
                     mToolBar->GetSize().y));
}
Ejemplo n.º 5
0
WrapSizerFrame::WrapSizerFrame()
        : wxFrame(NULL, wxID_ANY, "wxWrapSizer Sample")
{
    SetIcon(wxICON(sample));

    // Root sizer, vertical
    wxSizer * const sizerRoot = new wxBoxSizer(wxVERTICAL);

    // Some toolbars in a wrap sizer
    wxSizer * const sizerTop = new wxWrapSizer( wxHORIZONTAL );
    sizerTop->Add(MakeToolBar());
    sizerTop->Add(20, 1);
    sizerTop->Add(MakeToolBar());
    sizerTop->Add(20, 1);
    sizerTop->Add(MakeToolBar());
    sizerRoot->Add(sizerTop, wxSizerFlags().Expand().Border());

    // A number of checkboxes inside a wrap sizer
    wxSizer *sizerMid = new wxStaticBoxSizer(wxVERTICAL, this,
                                                "With check-boxes");
    wxSizer * const sizerMidWrap = new wxWrapSizer(wxHORIZONTAL);
    for ( int nCheck = 0; nCheck < 6; nCheck++ )
    {
        wxCheckBox *chk = new wxCheckBox
                                (
                                this,
                                wxID_ANY,
                                wxString::Format("Option %d", nCheck)
                                );

        sizerMidWrap->Add(chk, wxSizerFlags().Centre().Border());
    }

    sizerMid->Add(sizerMidWrap, wxSizerFlags(100).Expand());
    sizerRoot->Add(sizerMid, wxSizerFlags(100).Expand().Border());


    // A shaped item inside a box sizer
    wxSizer *sizerBottom = new wxStaticBoxSizer(wxVERTICAL, this,
                                                "With wxSHAPED item");
    wxSizer *sizerBottomBox = new wxBoxSizer(wxHORIZONTAL);
    sizerBottom->Add(sizerBottomBox, wxSizerFlags(100).Expand());

    sizerBottomBox->Add(new wxListBox(this, wxID_ANY,
                                        wxPoint(0, 0), wxSize(70, 70)),
                        wxSizerFlags().Expand().Shaped());
    sizerBottomBox->AddSpacer(10);
    sizerBottomBox->Add(new wxCheckBox(this, wxID_ANY,
                                        "A much longer option..."),
                        wxSizerFlags(100).Border());
    sizerRoot->Add(sizerBottom, wxSizerFlags(100).Expand().Border());

    // OK Button
    sizerRoot->Add(new wxButton(this, wxID_OK),
                    wxSizerFlags().Centre().DoubleBorder());
    Connect(wxID_OK, wxEVT_COMMAND_BUTTON_CLICKED,
                wxCommandEventHandler(WrapSizerFrame::OnButton));

    // Set sizer for window
    SetSizerAndFit(sizerRoot);

    Show();
}