From 7a4bc231ebbf97014781b363d3e52e600fd00d75 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 28 Dec 2013 22:29:48 -0700 Subject: [PATCH] added a name entry dialog to the form files --- obs/forms/OBSWindows.cpp | 49 +++++ obs/forms/OBSWindows.fbp | 461 +++++++++++++++++++++++++++++++++++++++ obs/forms/OBSWindows.h | 21 ++ 3 files changed, 531 insertions(+) diff --git a/obs/forms/OBSWindows.cpp b/obs/forms/OBSWindows.cpp index 29883339a..b78c2e47f 100644 --- a/obs/forms/OBSWindows.cpp +++ b/obs/forms/OBSWindows.cpp @@ -818,3 +818,52 @@ ProjectChooserBase::~ProjectChooserBase() exitButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProjectChooserBase::ExitClicked ), NULL, this ); } + +NameDialogBase::NameDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bSizer44; + bSizer44 = new wxBoxSizer( wxVERTICAL ); + + questionText = new wxStaticText( this, wxID_ANY, _("Please enter a name (or is it text you want to enter?):"), wxDefaultPosition, wxDefaultSize, 0 ); + questionText->Wrap( -1 ); + bSizer44->Add( questionText, 0, wxALL, 5 ); + + wxBoxSizer* bSizer46; + bSizer46 = new wxBoxSizer( wxHORIZONTAL ); + + + bSizer46->Add( 20, 0, 0, 0, 5 ); + + nameEdit = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizer46->Add( nameEdit, 1, wxALL|wxEXPAND, 5 ); + + + bSizer46->Add( 20, 0, 0, 0, 5 ); + + + bSizer44->Add( bSizer46, 0, wxEXPAND, 5 ); + + wxBoxSizer* bSizer45; + bSizer45 = new wxBoxSizer( wxHORIZONTAL ); + + okButton = new wxButton( this, wxID_ANY, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer45->Add( okButton, 0, wxALL, 5 ); + + cancelButton = new wxButton( this, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer45->Add( cancelButton, 0, wxALL, 5 ); + + + bSizer44->Add( bSizer45, 0, wxALIGN_CENTER_HORIZONTAL, 5 ); + + + this->SetSizer( bSizer44 ); + this->Layout(); + + this->Centre( wxBOTH ); +} + +NameDialogBase::~NameDialogBase() +{ +} diff --git a/obs/forms/OBSWindows.fbp b/obs/forms/OBSWindows.fbp index ca2801510..f74bfb964 100644 --- a/obs/forms/OBSWindows.fbp +++ b/obs/forms/OBSWindows.fbp @@ -7749,5 +7749,466 @@ + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + NameDialogBase + + 498,117 + wxDEFAULT_DIALOG_STYLE + + MaximumText + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bSizer44 + wxVERTICAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Please enter a name (or is it text you want to enter?): + + 0 + + + 0 + + 1 + questionText + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer46 + wxHORIZONTAL + none + + 5 + + 0 + + 0 + protected + 20 + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + nameEdit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + 0 + protected + 20 + + + + + + 5 + wxALIGN_CENTER_HORIZONTAL + 0 + + + bSizer45 + wxHORIZONTAL + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + OK + + 0 + + + 0 + + 1 + okButton + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Cancel + + 0 + + + 0 + + 1 + cancelButton + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/obs/forms/OBSWindows.h b/obs/forms/OBSWindows.h index cc16d6dc7..37141dacc 100644 --- a/obs/forms/OBSWindows.h +++ b/obs/forms/OBSWindows.h @@ -42,6 +42,7 @@ class WindowSubclass; #include #include #include +#include /////////////////////////////////////////////////////////////////////////// @@ -295,4 +296,24 @@ class ProjectChooserBase : public wxDialog }; +/////////////////////////////////////////////////////////////////////////////// +/// Class NameDialogBase +/////////////////////////////////////////////////////////////////////////////// +class NameDialogBase : public wxDialog +{ + private: + + protected: + wxStaticText* questionText; + wxTextCtrl* nameEdit; + wxButton* okButton; + wxButton* cancelButton; + + public: + + NameDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("MaximumText"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 498,117 ), long style = wxDEFAULT_DIALOG_STYLE ); + ~NameDialogBase(); + +}; + #endif //__OBSWINDOWS_H__