ServerS.cpp

Go to the documentation of this file.
00001 ////////////////////////////////////////////////////////////////////////////////
00002 //    Scorched3D (c) 2000-2003
00003 //
00004 //    This file is part of Scorched3D.
00005 //
00006 //    Scorched3D is free software; you can redistribute it and/or modify
00007 //    it under the terms of the GNU General Public License as published by
00008 //    the Free Software Foundation; either version 2 of the License, or
00009 //    (at your option) any later version.
00010 //
00011 //    Scorched3D is distributed in the hope that it will be useful,
00012 //    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 //    GNU General Public License for more details.
00015 //
00016 //    You should have received a copy of the GNU General Public License
00017 //    along with Scorched3D; if not, write to the Free Software
00018 //    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00019 ////////////////////////////////////////////////////////////////////////////////
00020 
00021 #include "ServerS-def.cpp"
00022 
00023 static void createControls(wxWindow *parent,
00024                                                    wxSizer *sizer)
00025 {
00026         wxStaticBox *servernameBox = 
00027                 new wxStaticBox(parent, -1, wxT("Server Settings"));
00028         wxStaticBoxSizer *servernameSizer = 
00029                 new wxStaticBoxSizer(servernameBox, wxVERTICAL);
00030         wxFlexGridSizer *servernameSizer2 = new wxFlexGridSizer(4, 2, 5, 5);
00031         IDC_SERVER_NAME_CTRL = 
00032                 new wxTextCtrl(parent, IDC_SERVER_NAME,
00033                 wxT(""),
00034                 wxDefaultPosition, wxSize((int) 226.5, -1));
00035         servernameSizer2->Add(new wxStaticText(parent, -1, wxT("Server Name :")), 
00036                                                   0, wxALIGN_CENTER_VERTICAL);
00037         servernameSizer2->Add(IDC_SERVER_NAME_CTRL);
00038         IDC_SERVER_PORT_CTRL = 
00039                 new wxTextCtrl(parent, -1,
00040                 wxT(""),
00041                 wxDefaultPosition, wxSize((int) 72, -1));
00042         servernameSizer2->Add(new wxStaticText(parent, -1, wxT("Port Number :")),
00043                                                   0, wxALIGN_CENTER_VERTICAL);
00044         servernameSizer2->Add(IDC_SERVER_PORT_CTRL);            
00045         IDC_SERVERMANAGEMENT_PORT_CTRL = new wxTextCtrl(parent, -1,
00046                 wxT(""),
00047                 wxDefaultPosition, wxSize((int) 72, -1));
00048         servernameSizer2->Add(new wxStaticText(parent, -1, wxT("Management Port Number :")),
00049                                                   0, wxALIGN_CENTER_VERTICAL);
00050         servernameSizer2->Add(IDC_SERVERMANAGEMENT_PORT_CTRL);          
00051         servernameSizer->Add(servernameSizer2);
00052         IDC_PUBLISHIP_CTRL_TEXT = new wxStaticText(parent, -1, wxT("Published IP :"));
00053         servernameSizer2->Add(IDC_PUBLISHIP_CTRL_TEXT,
00054                                                   0, wxALIGN_CENTER_VERTICAL);
00055 
00056         wxSizer *hori = new wxBoxSizer(wxHORIZONTAL);
00057         IDC_PUBLISHIP_CTRL = 
00058                 new wxTextCtrl(parent, IDC_PUBLISHIP,
00059                 wxT(""),
00060                 wxDefaultPosition, wxSize((int) 150, -1));
00061         hori->Add(IDC_PUBLISHIP_CTRL);
00062         IDOK_PUBLISHAUTO_CTRL =
00063                 new wxButton(parent, IDC_PUBLISHAUTO,
00064                 wxT("AutoDetect"));
00065         hori->Add(IDOK_PUBLISHAUTO_CTRL);
00066         servernameSizer2->Add(hori);            
00067 
00068         IDC_PUBLISH_CTRL = 
00069                 new wxCheckBox(parent, IDC_PUBLISH,
00070                 wxT("Allow ALL other internet users to see and use this server"));      
00071         servernameSizer->Add(IDC_PUBLISH_CTRL, 0, wxTOP, 5);
00072 
00073         IDC_ALLOWSAME_CTRL = 
00074                 new wxCheckBox(parent, -1,
00075                 wxT("Allow multiple clients from same machine to use this server"));    
00076         servernameSizer->Add(IDC_ALLOWSAME_CTRL, 0, wxTOP, 5);
00077         IDC_ALLOWSAMEID_CTRL = 
00078                 new wxCheckBox(parent, -1,
00079                 wxT("Allow multiple clients with the same unique id to use this server"));      
00080         servernameSizer->Add(IDC_ALLOWSAMEID_CTRL, 0, wxTOP, 5);
00081         IDC_LOGTOFILE_CTRL = 
00082                 new wxCheckBox(parent, -1,
00083                 wxT("Log to file"));    
00084         servernameSizer->Add(IDC_LOGTOFILE_CTRL, 0, wxTOP, 5);
00085 
00086         sizer->Add(servernameSizer, 0, wxALL, 5);
00087         
00088         wxStaticBox *modBox = 
00089                 new wxStaticBox(parent, -1, wxT("Mod Settings"));
00090         wxStaticBoxSizer *modSizer = 
00091                 new wxStaticBoxSizer(modBox, wxHORIZONTAL);
00092         modSizer->Add(new wxStaticText(parent, -1,
00093                 wxT("Use Mod :")), 0, wxALL, 5);
00094         IDC_SERVER_MOD_CTRL = 
00095                 new wxComboBox(parent, -1,
00096                 wxT(""),
00097                 wxDefaultPosition, wxDefaultSize,
00098                 0, 0, wxCB_READONLY);
00099         modSizer->Add(IDC_SERVER_MOD_CTRL, 0, wxALL, 5);
00100         sizer->Add(modSizer, 0, wxGROW | wxALIGN_RIGHT | wxALL, 5);
00101 
00102         wxStaticBox *advBox = 
00103                 new wxStaticBox(parent, -1, wxT("Advanced Settings"));
00104         wxStaticBoxSizer *advSizer = 
00105                 new wxStaticBoxSizer(advBox, wxVERTICAL);
00106         IDC_BUTTON_SETTINGS_CTRL = 
00107                 new wxButton(parent, IDC_BUTTON_SETTINGS,
00108                 wxT("Edit Advanced Settings"));
00109         advSizer->Add(IDC_BUTTON_SETTINGS_CTRL, 0, wxALL, 5);
00110         sizer->Add(advSizer, 0, wxGROW | wxALL, 5);
00111 
00112         // Ok and cancel boxes
00113         wxBoxSizer *buttonSizer = new wxBoxSizer(wxHORIZONTAL);
00114         IDCANCEL_CTRL = new wxButton(parent, wxID_CANCEL, wxT("Cancel"));
00115         IDOK_CTRL = new wxButton(parent, wxID_OK, wxT("Start Server"));
00116         buttonSizer->Add(IDCANCEL_CTRL, 0, wxALL, 10);
00117         buttonSizer->Add(IDOK_CTRL, 0, wxALL, 10);
00118         sizer->Add(buttonSizer, 0, wxALIGN_RIGHT);
00119 }
00120 

Generated on Mon Feb 16 15:14:52 2009 for Scorched3D by  doxygen 1.5.3