Update of /cvsroot/jsbsimcommander/src/gui In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv727/src/gui Modified Files: Makefile.am actuator.cpp actuator.h actuator_dlg.cpp actuator_dlg.h condition.h deadband.h doc.cpp doc.h filter.h func.h gain.h gain_dlg.cpp gain_dlg.h import.cpp kinemat.h pid.h sensor.h sensor_dlg.cpp sensor_dlg.h shape.h sum.h switch.h toolbar.cpp toolbar.h Log Message: More refinements to the actuator dialog Index: import.cpp =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/import.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** import.cpp 18 Feb 2007 16:54:25 -0000 1.5 --- import.cpp 14 Apr 2007 06:02:48 -0000 1.6 *************** *** 31,34 **** --- 31,35 ---- #include "sum.h" #include "pid.h" + #include "actuator.h" #include "gain.h" #include "filter.h" *************** *** 112,115 **** --- 113,118 ---- } else if (type == "pid") { shape = new PID; + } else if (type == "actuator") { + shape = new Actuator; } else if (type == "deadband") { shape = new DeadBand; Index: filter.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/filter.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** filter.h 6 Jul 2006 07:21:59 -0000 1.2 --- filter.h 14 Apr 2007 06:02:48 -0000 1.3 *************** *** 12,22 **** #define _FCSBUILDER_FILTER_H_ ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface #endif ! /* ! * FGFilter Componment ! */ class Filter: public ComponentShape --- 12,20 ---- #define _FCSBUILDER_FILTER_H_ ! #ifndef WX_PRECOMP ! #include <wx/wx.h> #endif ! #include "shape.h" class Filter: public ComponentShape Index: toolbar.cpp =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/toolbar.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** toolbar.cpp 23 Feb 2007 04:06:11 -0000 1.3 --- toolbar.cpp 14 Apr 2007 06:02:48 -0000 1.4 *************** *** 44,47 **** --- 44,48 ---- #include "pid.xpm" #include "sensor.xpm" + #include "actuator.xpm" #include "gain.xpm" #include "filter.xpm" *************** *** 118,121 **** --- 119,123 ---- wxBitmap PaletteSummer (wxBITMAP(summer)); wxBitmap PalettePID (wxBITMAP(pid)); + wxBitmap PaletteActuator (wxBITMAP(actuator)); wxBitmap PaletteGain (wxBITMAP(gain)); wxBitmap PaletteFilter (wxBITMAP(filter)); *************** *** 163,166 **** --- 165,170 ---- toolbar->AddTool (TOOLBAR_ADD_SWITCH, _("Switch"), PaletteSwitch, wxNullBitmap, wxITEM_CHECK, _("Switch"), _("Switch"), NULL); + toolbar->AddTool (TOOLBAR_ADD_ACTUATOR, _("Actuator"), PaletteActuator, + wxNullBitmap, wxITEM_CHECK, _("Actuator"), _("Actuator"), NULL); toolbar->AddTool (TOOLBAR_ADD_KINEMAT, _("Kinemat"), PaletteKinemat, wxNullBitmap, wxITEM_CHECK, _("Kinemat"), _("Kinemat"), Index: toolbar.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/toolbar.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** toolbar.h 23 Feb 2007 04:06:11 -0000 1.3 --- toolbar.h 14 Apr 2007 06:02:48 -0000 1.4 *************** *** 22,26 **** #define TOOLPALETTECLASS wxToolBar - /* * ToolBar to add shapes --- 22,25 ---- *************** *** 71,74 **** --- 70,74 ---- TOOLBAR_ADD_SUMMER, TOOLBAR_ADD_PID, + TOOLBAR_ADD_ACTUATOR, TOOLBAR_ADD_SENSOR, TOOLBAR_ADD_GAIN, Index: sum.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/sum.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** sum.h 30 Apr 2006 23:38:49 -0000 1.1.1.1 --- sum.h 14 Apr 2007 06:02:48 -0000 1.2 *************** *** 12,22 **** #define _FCSBUILDER_SUM_H_ ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface #endif ! /* ! * FGSummer Componment ! */ class Summer: public ComponentShape --- 12,20 ---- #define _FCSBUILDER_SUM_H_ ! #ifndef WX_PRECOMP ! #include <wx/wx.h> #endif ! #include "shape.h" class Summer: public ComponentShape Index: deadband.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/deadband.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** deadband.h 30 Apr 2006 23:38:42 -0000 1.1.1.1 --- deadband.h 14 Apr 2007 06:02:48 -0000 1.2 *************** *** 12,22 **** #define _FCSBUILDER_DEADBAND_H_ ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface #endif ! /* ! * FGFilter Componment ! */ class DeadBand: public ComponentShape --- 12,20 ---- #define _FCSBUILDER_DEADBAND_H_ ! #ifndef WX_PRECOMP ! #include <wx/wx.h> #endif ! #include "shape.h" class DeadBand: public ComponentShape Index: kinemat.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/kinemat.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** kinemat.h 14 Jul 2006 01:42:07 -0000 1.2 --- kinemat.h 14 Apr 2007 06:02:48 -0000 1.3 *************** *** 12,19 **** #define _FCSBUILDER_KINEMAT_H_ ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface #endif struct MySettingPair { --- 12,21 ---- #define _FCSBUILDER_KINEMAT_H_ ! #ifndef WX_PRECOMP ! #include <wx/wx.h> #endif + #include "shape.h" + struct MySettingPair { *************** *** 24,32 **** WX_DECLARE_LIST(MySettingPair,MySettingPairList); - - /* - * FGKinemat Componment - */ - class Kinemat: public ComponentShape { --- 26,29 ---- Index: gain_dlg.cpp =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/gain_dlg.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gain_dlg.cpp 14 Jul 2006 01:42:07 -0000 1.4 --- gain_dlg.cpp 14 Apr 2007 06:02:48 -0000 1.5 *************** *** 8,15 **** ///////////////////////////////////////////////////////////////////////////// - #ifdef __GNUG__ - // #pragma implementation - #endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" --- 8,11 ---- *************** *** 19,31 **** #endif - #ifndef WX_PRECOMP - #include <wx/wx.h> - #endif - #include <wx/valtext.h> #include <wx/valgen.h> - #include "shape.h" - #include "gain.h" #include "gain_dlg.h" --- 15,21 ---- Index: shape.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/shape.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** shape.h 4 Mar 2007 03:12:54 -0000 1.10 --- shape.h 14 Apr 2007 06:02:48 -0000 1.11 *************** *** 11,18 **** #define _FCSBUILDER_SHAPE_H_ - #if defined(__GNUG__) && !defined(__APPLE__) - // #pragma interface - #endif - #include <wx/deprecated/setup.h> --- 11,14 ---- Index: Makefile.am =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/Makefile.am,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile.am 23 Feb 2007 13:34:10 -0000 1.6 --- Makefile.am 14 Apr 2007 06:02:48 -0000 1.7 *************** *** 21,25 **** Propulsion_Diag.cpp doc.cpp kinemat.cpp EngineMgr_Diag.cpp\ MyFrame.cpp pid.cpp pid_dlg.cpp sensor.cpp \ ! sensor_dlg.cpp --- 21,25 ---- Propulsion_Diag.cpp doc.cpp kinemat.cpp EngineMgr_Diag.cpp\ MyFrame.cpp pid.cpp pid_dlg.cpp sensor.cpp \ ! sensor_dlg.cpp actuator.cpp actuator_dlg.cpp *************** *** 35,39 **** Propulsion_Diag.h doc.h kinemat.h EngineMgr_Diag.h \ MyFrame.h pid.h pid_dlg.h sensor.h \ ! sensor_dlg.h --- 35,39 ---- Propulsion_Diag.h doc.h kinemat.h EngineMgr_Diag.h \ MyFrame.h pid.h pid_dlg.h sensor.h \ ! sensor_dlg.h actuator.h actuator_dlg.h Index: switch.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/switch.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** switch.h 30 Apr 2006 23:38:50 -0000 1.1.1.1 --- switch.h 14 Apr 2007 06:02:48 -0000 1.2 *************** *** 12,25 **** #define _FCSBUILDER_SWITCH_H_ ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface #endif #include "condition.h" - /* - * FGSwitch Componment - */ - class Switch; class SwitchPropertyDialog; --- 12,21 ---- #define _FCSBUILDER_SWITCH_H_ ! #ifndef WX_PRECOMP ! #include <wx/wx.h> #endif #include "condition.h" class Switch; class SwitchPropertyDialog; Index: actuator.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/actuator.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** actuator.h 13 Apr 2007 04:14:19 -0000 1.1 --- actuator.h 14 Apr 2007 06:02:48 -0000 1.2 *************** *** 11,21 **** #define _FCSBUILDER_ACTUATOR_H_ ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface #endif ! /* ! * FGActuator Componment ! */ class Actuator: public ComponentShape --- 11,21 ---- #define _FCSBUILDER_ACTUATOR_H_ ! #ifndef WX_PRECOMP ! #include <wx/wx.h> #endif ! #include "shape.h" ! ! class ComponentShape; class Actuator: public ComponentShape Index: actuator_dlg.cpp =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/actuator_dlg.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** actuator_dlg.cpp 13 Apr 2007 04:14:19 -0000 1.1 --- actuator_dlg.cpp 14 Apr 2007 06:02:48 -0000 1.2 *************** *** 24,230 **** // ///////////////////////////////////////////////////////////////////////////// ! ! // -*- C++ -*- generated by wxGlade 0.4.1 on Fri Apr 06 07:40:41 2007 ! ! #include "actuator_dlg.h" ! ! ActuatorComponentEditor::ActuatorComponentEditor(Actuator *actuator, wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style): ! wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxTHICK_FRAME|wxSTAY_ON_TOP|wxFULL_REPAINT_ON_RESIZE) ! { ! // begin wxGlade: ActuatorComponentEditor::ActuatorComponentEditor ! nbk_Properties = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL|wxWS_EX_VALIDATE_RECURSIVELY); ! notebook_1_pane_1 = new wxPanel(nbk_Properties, -1); ! sizer_clip_staticbox = new wxStaticBox(notebook_1_pane_1, -1, wxT("Clipping")); ! sizer_actuator_properties_staticbox = new wxStaticBox(notebook_1_pane_1, -1, wxT("Actuator Properties")); ! sizer_inout_staticbox = new wxStaticBox(notebook_1_pane_1, -1, wxT("Input / Output")); ! sizer_basic_staticbox = new wxStaticBox(notebook_1_pane_1, -1, wxT("Basic Properties")); ! label_name = new wxStaticText(notebook_1_pane_1, -1, wxT("Name:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); ! txtEd_Name = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_type = new wxStaticText(notebook_1_pane_1, -1, wxT("Type:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); ! txtEd_Type = new wxTextCtrl(notebook_1_pane_1, -1, wxT("Actuator Component"), wxDefaultPosition, wxDefaultSize, wxTE_READONLY); ! label_order = new wxStaticText(notebook_1_pane_1, -1, wxT("Order:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); ! txtEd_Order = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! chx_Clip = new wxCheckBox(notebook_1_pane_1, -1, wxT("Clip")); ! label_clip_min = new wxStaticText(notebook_1_pane_1, -1, wxT("Minimum:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); ! txtEd_MinClip = new wxTextCtrl(notebook_1_pane_1, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY); ! label_clip_max = new wxStaticText(notebook_1_pane_1, -1, wxT("Maximum:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); ! txtEd_MaxClip = new wxTextCtrl(notebook_1_pane_1, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY); ! label_7 = new wxStaticText(notebook_1_pane_1, -1, wxT("Lag")); ! txtEd_Lag = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_10 = new wxStaticText(notebook_1_pane_1, -1, wxT("Rate limit")); ! txtEd_RateLimit = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_11 = new wxStaticText(notebook_1_pane_1, -1, wxT("Hysteresis")); ! txtEd_Hysteresis = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_17 = new wxStaticText(notebook_1_pane_1, -1, wxT("Bias")); ! txtEd_Bias = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_1 = new wxStaticText(notebook_1_pane_1, -1, wxT("Input Property:")); ! button_invert_input = new wxToggleButton(notebook_1_pane_1, -1, wxT("+")); ! txtEd_InputProperty = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_output_property = new wxStaticText(notebook_1_pane_1, -1, wxT("Output Property:")); ! txtEd_OutputProperty = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! txtEd_Description = new wxTextCtrl(nbk_Properties, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB|wxTE_MULTILINE|wxTE_WORDWRAP); ! button_OK = new wxButton(this, -1, wxT("OK")); ! button_Cancel = new wxButton(this, -1, wxT("Cancel")); ! button_Help = new wxButton(this, -1, wxT("Help")); ! ! set_properties(); ! do_layout(); ! // end wxGlade GetDataIn(actuator); ! } ! ! ! BEGIN_EVENT_TABLE(ActuatorComponentEditor, wxDialog) ! // begin wxGlade: ActuatorComponentEditor::event_table ! EVT_CHECKBOX(-1, ActuatorComponentEditor::OnCheckboxClip) ! EVT_TOGGLEBUTTON(-1, ActuatorComponentEditor::OnClickInvertInput) ! EVT_BUTTON(-1, ActuatorComponentEditor::OnButtonPressOK) ! EVT_BUTTON(-1, ActuatorComponentEditor::OnButtonPressCancel) ! EVT_BUTTON(-1, ActuatorComponentEditor::OnButtonPressHelp) ! // end wxGlade ! END_EVENT_TABLE(); ! ! ! void ActuatorComponentEditor::OnCheckboxClip(wxCommandEvent &event) ! { ! event.Skip(); ! } ! ! ! void ActuatorComponentEditor::OnClickInvertInput(wxCommandEvent &event) ! { ! event.Skip(); ! } ! ! ! void ActuatorComponentEditor::OnButtonPressOK(wxCommandEvent &event) ! { if (nbk_Properties->Validate()) nbk_Properties->TransferDataFromWindow(); ! ! event.Skip(); ! } ! ! ! void ActuatorComponentEditor::OnButtonPressCancel(wxCommandEvent &event) ! { ! event.Skip(); ! } ! ! ! void ActuatorComponentEditor::OnButtonPressHelp(wxCommandEvent &event) ! { ! event.Skip(); ! } ! ! ! // wxGlade: add ActuatorComponentEditor event handlers ! ! ! void ActuatorComponentEditor::set_properties() ! { ! // begin wxGlade: ActuatorComponentEditor::set_properties ! SetTitle(wxT("Actuator Component Editor")); ! txtEd_Name->SetToolTip(wxT("This is the name of the component. It can be a property name, or a human readable name, such as \"Pitch Feedback PID Control\". In the latter case, the name will be converted internally to a property name. In the given example, this will be \"fcs/pitch-feedback-pid-control\".")); ! txtEd_Name->SetFocus(); ! txtEd_Type->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION)); ! txtEd_Order->SetToolTip(wxT("This number represents the order in which the component will be \"executed\".")); ! label_clip_min->SetMinSize(wxSize(60, -1)); ! txtEd_MinClip->SetMinSize(wxSize(100,-1)); ! txtEd_MinClip->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION)); ! txtEd_MinClip->SetToolTip(wxT("This is the minimum value allowed for the component output. ")); ! label_clip_max->SetMinSize(wxSize(60, -1)); ! txtEd_MaxClip->SetMinSize(wxSize(100,-1)); ! txtEd_MaxClip->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION)); ! txtEd_MaxClip->SetToolTip(wxT("This is the maximum value allowed for the component output. ")); ! button_invert_input->SetMinSize(wxSize(21, 21)); ! button_invert_input->SetToolTip(wxT("Depress this button to invert the input property.")); ! button_invert_input->Enable(false); ! txtEd_InputProperty->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION)); ! txtEd_InputProperty->SetToolTip(wxT("This is the input property to the component. This is selected via connecting up the components in the editor.")); ! txtEd_OutputProperty->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION)); ! txtEd_OutputProperty->SetToolTip(wxT("This is the output property to the component. This is selected via connecting up the components in the editor.")); ! button_OK->SetToolTip(wxT("Clicking this button will save the changes made.")); ! button_Cancel->SetToolTip(wxT("Clicking on the Cancel button will abandon changes made.")); ! // end wxGlade ! } ! ! ! void ActuatorComponentEditor::do_layout() ! { ! // begin wxGlade: ActuatorComponentEditor::do_layout ! wxFlexGridSizer* grid_sizer_toplevel = new wxFlexGridSizer(2, 1, 5, 0); ! wxBoxSizer* sizer_buttons = new wxBoxSizer(wxHORIZONTAL); ! wxFlexGridSizer* grid_sizer_2 = new wxFlexGridSizer(5, 1, 5, 0); ! wxStaticBoxSizer* sizer_inout = new wxStaticBoxSizer(sizer_inout_staticbox, wxHORIZONTAL); ! wxFlexGridSizer* grid_sizer_inout = new wxFlexGridSizer(2, 2, 5, 5); ! wxFlexGridSizer* grid_sizer_1 = new wxFlexGridSizer(1, 2, 0, 2); ! wxStaticBoxSizer* sizer_actuator_properties = new wxStaticBoxSizer(sizer_actuator_properties_staticbox, wxVERTICAL); ! wxGridSizer* grid_sizer_7 = new wxGridSizer(4, 2, 3, 3); ! wxStaticBoxSizer* sizer_clip = new wxStaticBoxSizer(sizer_clip_staticbox, wxHORIZONTAL); ! wxFlexGridSizer* grid_sizer_clip = new wxFlexGridSizer(2, 2, 5, 10); ! wxBoxSizer* sizer_clip_min = new wxBoxSizer(wxHORIZONTAL); ! wxStaticBoxSizer* sizer_basic = new wxStaticBoxSizer(sizer_basic_staticbox, wxHORIZONTAL); ! wxFlexGridSizer* grid_sizer_basic_interior = new wxFlexGridSizer(3, 2, 5, 5); ! grid_sizer_basic_interior->Add(label_name, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_basic_interior->Add(txtEd_Name, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_basic_interior->Add(label_type, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_basic_interior->Add(txtEd_Type, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_basic_interior->Add(label_order, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_basic_interior->Add(txtEd_Order, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 0); ! grid_sizer_basic_interior->AddGrowableCol(1); ! sizer_basic->Add(grid_sizer_basic_interior, 1, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_2->Add(sizer_basic, 1, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_clip->Add(chx_Clip, 0, wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! sizer_clip_min->Add(label_clip_min, 0, wxLEFT|wxRIGHT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); ! sizer_clip_min->Add(txtEd_MinClip, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 0); ! sizer_clip_min->Add(label_clip_max, 0, wxLEFT|wxRIGHT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); ! sizer_clip_min->Add(txtEd_MaxClip, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 0); ! grid_sizer_clip->Add(sizer_clip_min, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_clip->AddGrowableCol(1); ! sizer_clip->Add(grid_sizer_clip, 1, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_2->Add(sizer_clip, 1, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(label_7, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(txtEd_Lag, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(label_10, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(txtEd_RateLimit, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(label_11, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(txtEd_Hysteresis, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(label_17, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(txtEd_Bias, 0, wxADJUST_MINSIZE, 0); ! sizer_actuator_properties->Add(grid_sizer_7, 1, wxEXPAND, 0); ! grid_sizer_2->Add(sizer_actuator_properties, 1, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_inout->Add(label_1, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_1->Add(button_invert_input, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_1->Add(txtEd_InputProperty, 0, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_1->AddGrowableCol(1); ! grid_sizer_inout->Add(grid_sizer_1, 1, wxEXPAND, 0); ! grid_sizer_inout->Add(label_output_property, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_inout->Add(txtEd_OutputProperty, 0, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_inout->AddGrowableCol(1); ! sizer_inout->Add(grid_sizer_inout, 1, wxEXPAND, 0); ! grid_sizer_2->Add(sizer_inout, 1, wxEXPAND, 0); ! notebook_1_pane_1->SetAutoLayout(true); ! notebook_1_pane_1->SetSizer(grid_sizer_2); ! grid_sizer_2->Fit(notebook_1_pane_1); ! grid_sizer_2->SetSizeHints(notebook_1_pane_1); ! grid_sizer_2->AddGrowableCol(0); ! nbk_Properties->AddPage(notebook_1_pane_1, wxT("Properties")); ! nbk_Properties->AddPage(txtEd_Description, wxT("Comments")); ! grid_sizer_toplevel->Add(nbk_Properties, 1, wxEXPAND, 0); ! sizer_buttons->Add(button_OK, 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); ! sizer_buttons->Add(button_Cancel, 0, wxLEFT|wxRIGHT, 5); ! sizer_buttons->Add(button_Help, 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); ! grid_sizer_toplevel->Add(sizer_buttons, 1, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); ! SetAutoLayout(true); ! SetSizer(grid_sizer_toplevel); ! grid_sizer_toplevel->Fit(this); ! grid_sizer_toplevel->SetSizeHints(this); ! grid_sizer_toplevel->AddGrowableRow(0); ! grid_sizer_toplevel->AddGrowableCol(0); ! Layout(); Centre(); ! // end wxGlade ! } ! /** * Show ========================================================================= --- 24,230 ---- // ///////////////////////////////////////////////////////////////////////////// ! ! // -*- C++ -*- generated by wxGlade 0.4.1 on Fri Apr 06 07:40:41 2007 ! ! #include "actuator_dlg.h" ! ! ActuatorComponentEditor::ActuatorComponentEditor(Actuator *actuator, wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style): ! wxDialog(parent, id, title, pos, size, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxTHICK_FRAME|wxSTAY_ON_TOP|wxFULL_REPAINT_ON_RESIZE) ! { ! // begin wxGlade: ActuatorComponentEditor::ActuatorComponentEditor ! nbk_Properties = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER|wxTAB_TRAVERSAL|wxWS_EX_VALIDATE_RECURSIVELY); ! notebook_1_pane_1 = new wxPanel(nbk_Properties, -1); ! sizer_clip_staticbox = new wxStaticBox(notebook_1_pane_1, -1, wxT("Clipping")); ! sizer_actuator_properties_staticbox = new wxStaticBox(notebook_1_pane_1, -1, wxT("Actuator Properties")); ! sizer_inout_staticbox = new wxStaticBox(notebook_1_pane_1, -1, wxT("Input / Output")); ! sizer_basic_staticbox = new wxStaticBox(notebook_1_pane_1, -1, wxT("Basic Properties")); ! label_name = new wxStaticText(notebook_1_pane_1, -1, wxT("Name:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); ! txtEd_Name = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_type = new wxStaticText(notebook_1_pane_1, -1, wxT("Type:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); ! txtEd_Type = new wxTextCtrl(notebook_1_pane_1, -1, wxT("Actuator Component"), wxDefaultPosition, wxDefaultSize, wxTE_READONLY); ! label_order = new wxStaticText(notebook_1_pane_1, -1, wxT("Order:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); ! txtEd_Order = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! chx_Clip = new wxCheckBox(notebook_1_pane_1, -1, wxT("Clip")); ! label_clip_min = new wxStaticText(notebook_1_pane_1, -1, wxT("Minimum:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); ! txtEd_MinClip = new wxTextCtrl(notebook_1_pane_1, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY); ! label_clip_max = new wxStaticText(notebook_1_pane_1, -1, wxT("Maximum:"), wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); ! txtEd_MaxClip = new wxTextCtrl(notebook_1_pane_1, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY); ! label_7 = new wxStaticText(notebook_1_pane_1, -1, wxT("Lag")); ! txtEd_Lag = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_10 = new wxStaticText(notebook_1_pane_1, -1, wxT("Rate limit")); ! txtEd_RateLimit = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_11 = new wxStaticText(notebook_1_pane_1, -1, wxT("Hysteresis")); ! txtEd_Hysteresis = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_17 = new wxStaticText(notebook_1_pane_1, -1, wxT("Bias")); ! txtEd_Bias = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_1 = new wxStaticText(notebook_1_pane_1, -1, wxT("Input Property:")); ! button_invert_input = new wxToggleButton(notebook_1_pane_1, -1, wxT("+")); ! txtEd_InputProperty = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! label_output_property = new wxStaticText(notebook_1_pane_1, -1, wxT("Output Property:")); ! txtEd_OutputProperty = new wxTextCtrl(notebook_1_pane_1, -1, wxT("")); ! txtEd_Description = new wxTextCtrl(nbk_Properties, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB|wxTE_MULTILINE|wxTE_WORDWRAP); ! button_OK = new wxButton(this, wxID_OK, wxT("OK")); ! button_Cancel = new wxButton(this, wxID_CANCEL, wxT("Cancel")); ! button_Help = new wxButton(this, -1, wxT("Help")); ! ! set_properties(); ! do_layout(); ! // end wxGlade GetDataIn(actuator); ! } ! ! ! BEGIN_EVENT_TABLE(ActuatorComponentEditor, wxDialog) ! // begin wxGlade: ActuatorComponentEditor::event_table ! EVT_CHECKBOX(-1, ActuatorComponentEditor::OnCheckboxClip) ! EVT_TOGGLEBUTTON(-1, ActuatorComponentEditor::OnClickInvertInput) ! EVT_BUTTON(wxID_OK, ActuatorComponentEditor::OnButtonPressOK) ! EVT_BUTTON(wxID_CANCEL, ActuatorComponentEditor::OnButtonPressCancel) ! EVT_BUTTON(-1, ActuatorComponentEditor::OnButtonPressHelp) ! // end wxGlade ! END_EVENT_TABLE(); ! ! ! void ActuatorComponentEditor::OnCheckboxClip(wxCommandEvent &event) ! { ! event.Skip(); ! } ! ! ! void ActuatorComponentEditor::OnClickInvertInput(wxCommandEvent &event) ! { ! event.Skip(); ! } ! ! ! void ActuatorComponentEditor::OnButtonPressOK(wxCommandEvent &event) ! { if (nbk_Properties->Validate()) nbk_Properties->TransferDataFromWindow(); ! ! event.Skip(); ! } ! ! ! void ActuatorComponentEditor::OnButtonPressCancel(wxCommandEvent &event) ! { ! event.Skip(); ! } ! ! ! void ActuatorComponentEditor::OnButtonPressHelp(wxCommandEvent &event) ! { ! event.Skip(); ! } ! ! ! // wxGlade: add ActuatorComponentEditor event handlers ! ! ! void ActuatorComponentEditor::set_properties() ! { ! // begin wxGlade: ActuatorComponentEditor::set_properties ! SetTitle(wxT("Actuator Component Editor")); ! txtEd_Name->SetToolTip(wxT("This is the name of the component. It can be a property name, or a human readable name, such as \"Pitch Feedback PID Control\". In the latter case, the name will be converted internally to a property name. In the given example, this will be \"fcs/pitch-feedback-pid-control\".")); ! txtEd_Name->SetFocus(); ! txtEd_Type->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION)); ! txtEd_Order->SetToolTip(wxT("This number represents the order in which the component will be \"executed\".")); ! label_clip_min->SetMinSize(wxSize(60, -1)); ! txtEd_MinClip->SetMinSize(wxSize(100,-1)); ! txtEd_MinClip->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION)); ! txtEd_MinClip->SetToolTip(wxT("This is the minimum value allowed for the component output. ")); ! label_clip_max->SetMinSize(wxSize(60, -1)); ! txtEd_MaxClip->SetMinSize(wxSize(100,-1)); ! txtEd_MaxClip->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION)); ! txtEd_MaxClip->SetToolTip(wxT("This is the maximum value allowed for the component output. ")); ! button_invert_input->SetMinSize(wxSize(21, 21)); ! button_invert_input->SetToolTip(wxT("Depress this button to invert the input property.")); ! button_invert_input->Enable(false); ! txtEd_InputProperty->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION)); ! txtEd_InputProperty->SetToolTip(wxT("This is the input property to the component. This is selected via connecting up the components in the editor.")); ! txtEd_OutputProperty->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_INACTIVECAPTION)); ! txtEd_OutputProperty->SetToolTip(wxT("This is the output property to the component. This is selected via connecting up the components in the editor.")); ! button_OK->SetToolTip(wxT("Clicking this button will save the changes made.")); ! button_Cancel->SetToolTip(wxT("Clicking on the Cancel button will abandon changes made.")); ! // end wxGlade ! } ! ! ! void ActuatorComponentEditor::do_layout() ! { ! // begin wxGlade: ActuatorComponentEditor::do_layout ! wxFlexGridSizer* grid_sizer_toplevel = new wxFlexGridSizer(2, 1, 5, 0); ! wxBoxSizer* sizer_buttons = new wxBoxSizer(wxHORIZONTAL); ! wxFlexGridSizer* grid_sizer_2 = new wxFlexGridSizer(5, 1, 5, 0); ! wxStaticBoxSizer* sizer_inout = new wxStaticBoxSizer(sizer_inout_staticbox, wxHORIZONTAL); ! wxFlexGridSizer* grid_sizer_inout = new wxFlexGridSizer(2, 2, 5, 5); ! wxFlexGridSizer* grid_sizer_1 = new wxFlexGridSizer(1, 2, 0, 2); ! wxStaticBoxSizer* sizer_actuator_properties = new wxStaticBoxSizer(sizer_actuator_properties_staticbox, wxVERTICAL); ! wxGridSizer* grid_sizer_7 = new wxGridSizer(4, 2, 3, 3); ! wxStaticBoxSizer* sizer_clip = new wxStaticBoxSizer(sizer_clip_staticbox, wxHORIZONTAL); ! wxFlexGridSizer* grid_sizer_clip = new wxFlexGridSizer(2, 2, 5, 10); ! wxBoxSizer* sizer_clip_min = new wxBoxSizer(wxHORIZONTAL); ! wxStaticBoxSizer* sizer_basic = new wxStaticBoxSizer(sizer_basic_staticbox, wxHORIZONTAL); ! wxFlexGridSizer* grid_sizer_basic_interior = new wxFlexGridSizer(3, 2, 5, 5); ! grid_sizer_basic_interior->Add(label_name, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_basic_interior->Add(txtEd_Name, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_basic_interior->Add(label_type, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_basic_interior->Add(txtEd_Type, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_basic_interior->Add(label_order, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_basic_interior->Add(txtEd_Order, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 0); ! grid_sizer_basic_interior->AddGrowableCol(1); ! sizer_basic->Add(grid_sizer_basic_interior, 1, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_2->Add(sizer_basic, 1, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_clip->Add(chx_Clip, 0, wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! sizer_clip_min->Add(label_clip_min, 0, wxLEFT|wxRIGHT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); ! sizer_clip_min->Add(txtEd_MinClip, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 0); ! sizer_clip_min->Add(label_clip_max, 0, wxLEFT|wxRIGHT|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); ! sizer_clip_min->Add(txtEd_MaxClip, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxFIXED_MINSIZE, 0); ! grid_sizer_clip->Add(sizer_clip_min, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_clip->AddGrowableCol(1); ! sizer_clip->Add(grid_sizer_clip, 1, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_2->Add(sizer_clip, 1, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(label_7, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(txtEd_Lag, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(label_10, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(txtEd_RateLimit, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(label_11, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(txtEd_Hysteresis, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(label_17, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_7->Add(txtEd_Bias, 0, wxADJUST_MINSIZE, 0); ! sizer_actuator_properties->Add(grid_sizer_7, 1, wxEXPAND, 0); ! grid_sizer_2->Add(sizer_actuator_properties, 1, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_inout->Add(label_1, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_1->Add(button_invert_input, 0, wxADJUST_MINSIZE, 0); ! grid_sizer_1->Add(txtEd_InputProperty, 0, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_1->AddGrowableCol(1); ! grid_sizer_inout->Add(grid_sizer_1, 1, wxEXPAND, 0); ! grid_sizer_inout->Add(label_output_property, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0); ! grid_sizer_inout->Add(txtEd_OutputProperty, 0, wxEXPAND|wxADJUST_MINSIZE, 0); ! grid_sizer_inout->AddGrowableCol(1); ! sizer_inout->Add(grid_sizer_inout, 1, wxEXPAND, 0); ! grid_sizer_2->Add(sizer_inout, 1, wxEXPAND, 0); ! notebook_1_pane_1->SetAutoLayout(true); ! notebook_1_pane_1->SetSizer(grid_sizer_2); ! grid_sizer_2->Fit(notebook_1_pane_1); ! grid_sizer_2->SetSizeHints(notebook_1_pane_1); ! grid_sizer_2->AddGrowableCol(0); ! nbk_Properties->AddPage(notebook_1_pane_1, wxT("Properties")); ! nbk_Properties->AddPage(txtEd_Description, wxT("Comments")); ! grid_sizer_toplevel->Add(nbk_Properties, 1, wxEXPAND, 0); ! sizer_buttons->Add(button_OK, 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); ! sizer_buttons->Add(button_Cancel, 0, wxLEFT|wxRIGHT, 5); ! sizer_buttons->Add(button_Help, 0, wxLEFT|wxRIGHT|wxADJUST_MINSIZE, 5); ! grid_sizer_toplevel->Add(sizer_buttons, 1, wxALL|wxALIGN_CENTER_HORIZONTAL, 5); ! SetAutoLayout(true); ! SetSizer(grid_sizer_toplevel); ! grid_sizer_toplevel->Fit(this); ! grid_sizer_toplevel->SetSizeHints(this); ! grid_sizer_toplevel->AddGrowableRow(0); ! grid_sizer_toplevel->AddGrowableCol(0); ! Layout(); Centre(); ! // end wxGlade ! } ! /** * Show ========================================================================= *************** *** 244,251 **** */ ! void ActuatorComponentEditor::GetDataIn(Sensor * g) { //name = g->GetName(); ! *txtEd_name << g->GetName(); description = g->GetDescription(); order = wxString::Format(wxT("%ld"), g->GetOrder()); --- 244,251 ---- */ ! void ActuatorComponentEditor::GetDataIn(Actuator * g) { //name = g->GetName(); ! *txtEd_Name << g->GetName(); description = g->GetDescription(); order = wxString::Format(wxT("%ld"), g->GetOrder()); *************** *** 254,258 **** clip_min = g->GetClipMin(); ! *txtEd_order << order; if (clipable) { --- 254,258 ---- clip_min = g->GetClipMin(); ! *txtEd_Order << order; if (clipable) { *************** *** 271,275 **** txtEd_OutputProperty->SetValue(g->GetOutputName()); ! /* if (inputs.GetCount() > 0) { if (inputs[0] != wxT("NULL")) --- 271,280 ---- txtEd_OutputProperty->SetValue(g->GetOutputName()); ! ! txtEd_Lag->SetValue(""); *txtEd_Lag << g->GetLag(); ! txtEd_RateLimit->SetValue(""); *txtEd_RateLimit << g->GetRate_Limit(); ! txtEd_Hysteresis->SetValue(""); *txtEd_Hysteresis << g->GetHysteresis_Width(); ! txtEd_Bias->SetValue(""); *txtEd_Bias << g->GetBias(); ! if (inputs.GetCount() > 0) { if (inputs[0] != wxT("NULL")) *************** *** 284,291 **** } } ! text_ctrl_input_prop->SetValue(inputs[0]); } ! text_ctrl_1->SetValue(g->GetDescription()); ! */ } --- 289,296 ---- } } ! txtEd_InputProperty->SetValue(inputs[0]); } ! txtEd_Description->SetValue(g->GetDescription()); ! } *************** *** 294,302 **** */ ! void ActuatorComponentEditor::SetDataOut(Sensor * g) { g->SetName(txtEd_Name->GetValue()); long int tmpl; order.ToLong(&tmpl); g->SetOrder(tmpl); --- 299,309 ---- */ ! void ActuatorComponentEditor::SetDataOut(Actuator * g) { g->SetName(txtEd_Name->GetValue()); long int tmpl; + double tmp; + order.ToLong(&tmpl); g->SetOrder(tmpl); *************** *** 306,313 **** g->SetClipMin(clip_min); ! g->SetDescription(text_ctrl_1->GetValue()); g->SetInputIsInverted(false); ! if (text_ctrl_input_prop->GetValue() != wxT("NULL")) // true if input prop is present if (button_invert_input->GetValue()) // true if inverted g->SetInputIsInverted(true); --- 313,332 ---- g->SetClipMin(clip_min); ! g->SetDescription(txtEd_Description->GetValue()); ! ! txtEd_Lag->GetValue().ToDouble(&tmp); ! g->SetLag(tmp); ! ! txtEd_RateLimit->GetValue().ToDouble(&tmp); ! g->SetRate_Limit(tmp); ! ! txtEd_Hysteresis->GetValue().ToDouble(&tmp); ! g->SetHysteresis_Width(tmp); ! ! txtEd_Bias->GetValue().ToDouble(&tmp); ! g->SetBias(tmp); g->SetInputIsInverted(false); ! if (txtEd_InputProperty->GetValue() != wxT("NULL")) // true if input prop is present if (button_invert_input->GetValue()) // true if inverted g->SetInputIsInverted(true); Index: gain_dlg.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/gain_dlg.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gain_dlg.h 30 Apr 2006 23:38:46 -0000 1.1.1.1 --- gain_dlg.h 14 Apr 2007 06:02:48 -0000 1.2 *************** *** 8,17 **** ///////////////////////////////////////////////////////////////////////////// ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface ! #endif #include <wx/wx.h> #include <wx/image.h> // begin wxGlade: ::dependencies #include <wx/notebook.h> --- 8,17 ---- ///////////////////////////////////////////////////////////////////////////// ! #ifndef GAIN_DLG_H ! #define GAIN_DLG_H #include <wx/wx.h> #include <wx/image.h> + // begin wxGlade: ::dependencies #include <wx/notebook.h> *************** *** 19,26 **** // end wxGlade - - #ifndef GAIN_DLG_H - #define GAIN_DLG_H - class Gain; class GainPropertyDialog: public wxDialog --- 19,22 ---- *************** *** 106,109 **** --- 102,106 ---- }; + #include "gain.h" #endif // GAIN_DLG_H Index: actuator.cpp =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/actuator.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** actuator.cpp 13 Apr 2007 04:14:19 -0000 1.1 --- actuator.cpp 14 Apr 2007 06:02:48 -0000 1.2 *************** *** 17,24 **** ///////////////////////////////////////////////////////////////////////////// - #ifdef __GNUG__ - // #pragma implementation - #endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" --- 17,20 ---- *************** *** 32,50 **** #endif - #include "wx/deprecated/setup.h" - #if wxUSE_PROLOGIO #include "wx/deprecated/wxexpr.h" #endif - #include "wx/ogl/ogl.h" - - #include "FGXMLElement.h" - #include "MyApp.h" - #include "shape.h" #include "actuator.h" - IMPLEMENT_DYNAMIC_CLASS (Actuator, ComponentShape) --- 28,38 ---- *************** *** 54,59 **** Actuator::Actuator (double w, double h, const wxString & Name ) ! :ComponentShape(w, h, wxT("actuator"), Name), ! Noise(0.0) { SetAttachmentMode (ATTACHMENT_MODE_EDGE); --- 42,46 ---- Actuator::Actuator (double w, double h, const wxString & Name ) ! :ComponentShape(w, h, wxT("actuator"), Name) { SetAttachmentMode (ATTACHMENT_MODE_EDGE); *************** *** 63,67 **** GetAttachments ().Append (new wxAttachmentPoint (1, -w * 0.5, 0.0)); ! // input_sign_list.Append(new bool(false)); InputIsInverted = false; } --- 50,58 ---- GetAttachments ().Append (new wxAttachmentPoint (1, -w * 0.5, 0.0)); ! Lag = 0.0; ! Bias = 0.0; ! Rate_Limit = 0.0; ! Hysteresis_Width = 0.0; ! InputIsInverted = false; } *************** *** 211,215 **** if ( el->FindElement("hysteresis_width")) Hysteresis_Width = el->FindElementValueAsNumber("hysteresis_width"); ! InputIsInverted = *((GetInputSignList().Item(0))->GetData()); return strings; --- 202,206 ---- if ( el->FindElement("hysteresis_width")) Hysteresis_Width = el->FindElementValueAsNumber("hysteresis_width"); ! InputIsInverted = GetInputIsInverted(); return strings; Index: sensor_dlg.cpp =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/sensor_dlg.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sensor_dlg.cpp 30 Mar 2007 04:43:47 -0000 1.3 --- sensor_dlg.cpp 14 Apr 2007 06:02:48 -0000 1.4 *************** *** 27,34 **** // -*- C++ -*- generated by wxGlade 0.4.1 on Sat Jul 15 08:54:44 2006 - #ifdef __GNUG__ - // #pragma implementation - #endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" --- 27,30 ---- *************** *** 38,53 **** #endif - #ifndef WX_PRECOMP - #include <wx/wx.h> - #endif - #include <wx/valtext.h> #include <wx/valgen.h> - #include "shape.h" - #include "sensor.h" #include "sensor_dlg.h" ! #include "Property_Diag.h" ! #include "MyApp.h" // All non-MSW platforms use an xpm. MSW uses an .ico file --- 34,43 ---- #endif #include <wx/valtext.h> #include <wx/valgen.h> #include "sensor_dlg.h" ! //#include "Property_Diag.h" ! //#include "MyApp.h" // All non-MSW platforms use an xpm. MSW uses an .ico file Index: doc.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/doc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** doc.h 9 Jul 2006 04:42:09 -0000 1.2 --- doc.h 14 Apr 2007 06:02:48 -0000 1.3 *************** *** 11,18 **** #define _FCSBUILDER_DOC_H_ - #if defined(__GNUG__) && !defined(__APPLE__) - // #pragma interface - #endif - #include <vector> --- 11,14 ---- Index: sensor.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/sensor.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sensor.h 30 Mar 2007 04:43:47 -0000 1.4 --- sensor.h 14 Apr 2007 06:02:48 -0000 1.5 *************** *** 11,21 **** #define _FCSBUILDER_SENSOR_H_ ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface #endif ! /* ! * FGSensor Componment ! */ class Sensor: public ComponentShape --- 11,19 ---- #define _FCSBUILDER_SENSOR_H_ ! #ifndef WX_PRECOMP ! #include <wx/wx.h> #endif ! #include "shape.h" class Sensor: public ComponentShape Index: condition.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/condition.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** condition.h 30 Apr 2006 23:38:42 -0000 1.1.1.1 --- condition.h 14 Apr 2007 06:02:48 -0000 1.2 *************** *** 12,24 **** #define _FCSBUILDER_CONDITION_H_ ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface #endif extern wxString alias(wxString value, wxArrayString & array); - /* - * FGCondition - */ class Condition; WX_DECLARE_LIST(Condition,ConditionList); --- 12,21 ---- #define _FCSBUILDER_CONDITION_H_ ! #ifndef WX_PRECOMP ! #include <wx/wx.h> #endif extern wxString alias(wxString value, wxArrayString & array); class Condition; WX_DECLARE_LIST(Condition,ConditionList); Index: pid.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/pid.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** pid.h 14 Jul 2006 01:42:08 -0000 1.4 --- pid.h 14 Apr 2007 06:02:48 -0000 1.5 *************** *** 11,21 **** #define _FCSBUILDER_PID_H_ ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface #endif ! /* ! * FGPID Componment ! */ class PID: public ComponentShape --- 11,19 ---- #define _FCSBUILDER_PID_H_ ! #ifndef WX_PRECOMP ! #include <wx/wx.h> #endif ! #include "shape.h" class PID: public ComponentShape Index: func.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/func.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** func.h 30 Apr 2006 23:38:44 -0000 1.1.1.1 --- func.h 14 Apr 2007 06:02:48 -0000 1.2 *************** *** 12,19 **** #define _FCSBUILDER_FCSFUNCTION_H_ ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface #endif class TreeItemData_function; #include <wx/treectrl.h> --- 12,21 ---- #define _FCSBUILDER_FCSFUNCTION_H_ ! #ifndef WX_PRECOMP ! #include <wx/wx.h> #endif + #include "shape.h" + class TreeItemData_function; #include <wx/treectrl.h> Index: sensor_dlg.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/sensor_dlg.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sensor_dlg.h 23 Feb 2007 04:02:20 -0000 1.1 --- sensor_dlg.h 14 Apr 2007 06:02:48 -0000 1.2 *************** *** 10,19 **** // -*- C++ -*- generated by wxGlade 0.4.1 on Sat Jul 15 08:54:44 2006 - #include <wx/wx.h> - #include <wx/image.h> - #ifndef SENSORCOMPONENTEDITOR_H #define SENSORCOMPONENTEDITOR_H // begin wxGlade: ::dependencies #include <wx/notebook.h> --- 10,19 ---- // -*- C++ -*- generated by wxGlade 0.4.1 on Sat Jul 15 08:54:44 2006 #ifndef SENSORCOMPONENTEDITOR_H #define SENSORCOMPONENTEDITOR_H + #include <wx/wx.h> + #include <wx/image.h> + // begin wxGlade: ::dependencies #include <wx/notebook.h> *************** *** 112,118 **** wxString clip_min; - }; // wxGlade: end class #endif // SENSORCOMPONENTEDITOR_H --- 112,118 ---- wxString clip_min; }; // wxGlade: end class + #include "sensor.h" #endif // SENSORCOMPONENTEDITOR_H Index: doc.cpp =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/doc.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** doc.cpp 4 Mar 2007 08:13:57 -0000 1.10 --- doc.cpp 14 Apr 2007 06:02:48 -0000 1.11 *************** *** 41,44 **** --- 41,46 ---- #include "pid.h" #include "pid_dlg.h" + #include "actuator.h" + #include "actuator_dlg.h" #include "gain.h" #include "gain_dlg.h" *************** *** 49,55 **** #include "switch.h" #include "switch_dlg.h" - #include "kinemat.h" #include "sensor.h" #include "sensor_dlg.h" #include "kinemat_dlg.h" #include "fcsprop_dlg.h" --- 51,57 ---- #include "switch.h" #include "switch_dlg.h" #include "sensor.h" #include "sensor_dlg.h" + #include "kinemat.h" #include "kinemat_dlg.h" #include "fcsprop_dlg.h" *************** *** 60,65 **** #include "func.h" #include "func_dlg.h" - #include "sensor.h" - #include "sensor_dlg.h" BEGIN_EVENT_TABLE (DiagramDocument, wxPanel) --- 62,65 ---- *************** *** 622,626 **** //TODO wxArrayString list; ! GainPropertyDialog dlg((Gain *)theShape, list, this, wxID_ANY, _("Gain Componment")); if ( dlg.ShowModal() == wxID_OK ) { --- 622,626 ---- //TODO wxArrayString list; ! GainPropertyDialog dlg((Gain *)theShape, list, this, wxID_ANY, _("Gain Component")); if ( dlg.ShowModal() == wxID_OK ) { *************** *** 638,642 **** else if (theShape->IsKindOf (CLASSINFO (PID))) { ! PIDPropertyDialog dlg((PID *)theShape, this,wxID_ANY,_("PID Componment")); if ( dlg.ShowModal() == wxID_OK ) { --- 638,642 ---- else if (theShape->IsKindOf (CLASSINFO (PID))) { ! PIDPropertyDialog dlg((PID *)theShape, this,wxID_ANY,_("PID Component")); if ( dlg.ShowModal() == wxID_OK ) { *************** *** 646,650 **** else if (theShape->IsKindOf (CLASSINFO (Sensor))) { ! SensorComponentEditor dlg((Sensor *)theShape, this,wxID_ANY,_("Sensor Componment")); if ( dlg.ShowModal() == wxID_OK ) { --- 646,650 ---- else if (theShape->IsKindOf (CLASSINFO (Sensor))) { ! SensorComponentEditor dlg((Sensor *)theShape, this,wxID_ANY,_("Sensor Component")); if ( dlg.ShowModal() == wxID_OK ) { *************** *** 653,659 **** } else if (theShape->IsKindOf (CLASSINFO (Filter))) { ! FilterPropertyDialog dlg((Filter *)theShape, this,wxID_ANY,_("Filter Componment")); if ( dlg.ShowModal() == wxID_OK ) { --- 653,668 ---- } + else if (theShape->IsKindOf (CLASSINFO (Actuator))) + { + ActuatorComponentEditor dlg((Actuator *)theShape, this,wxID_ANY,_("Actuator Component")); + if ( dlg.ShowModal() == wxID_OK ) + { + dlg.SetDataOut((Actuator *)theShape); + } + } + else if (theShape->IsKindOf (CLASSINFO (Filter))) { ! FilterPropertyDialog dlg((Filter *)theShape, this,wxID_ANY,_("Filter Component")); if ( dlg.ShowModal() == wxID_OK ) { *************** *** 663,667 **** else if (theShape->IsKindOf (CLASSINFO (DeadBand))) { ! DeadBandPropertyDialog dlg((DeadBand *)theShape, this,wxID_ANY,_("DeadBand Componment")); if ( dlg.ShowModal() == wxID_OK ) { --- 672,676 ---- else if (theShape->IsKindOf (CLASSINFO (DeadBand))) { ! DeadBandPropertyDialog dlg((DeadBand *)theShape, this,wxID_ANY,_("DeadBand Component")); if ( dlg.ShowModal() == wxID_OK ) { *************** *** 671,675 **** else if (theShape->IsKindOf (CLASSINFO (Switch))) { ! SwitchPropertyDialog dlg((Switch *)theShape, this,wxID_ANY,_("Switch Componment")); if ( dlg.ShowModal() == wxID_OK ) { --- 680,684 ---- else if (theShape->IsKindOf (CLASSINFO (Switch))) { ! SwitchPropertyDialog dlg((Switch *)theShape, this,wxID_ANY,_("Switch Component")); if ( dlg.ShowModal() == wxID_OK ) { *************** *** 679,683 **** else if (theShape->IsKindOf (CLASSINFO (Kinemat))) { ! KinematPropertyDialog dlg((Kinemat *)theShape, this,wxID_ANY,_("Kinemat Componment")); if ( dlg.ShowModal() == wxID_OK ) { --- 688,692 ---- else if (theShape->IsKindOf (CLASSINFO (Kinemat))) { ! KinematPropertyDialog dlg((Kinemat *)theShape, this,wxID_ANY,_("Kinemat Component")); if ( dlg.ShowModal() == wxID_OK ) { Index: actuator_dlg.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/actuator_dlg.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** actuator_dlg.h 13 Apr 2007 04:14:19 -0000 1.1 --- actuator_dlg.h 14 Apr 2007 06:02:48 -0000 1.2 *************** *** 8,87 **** ///////////////////////////////////////////////////////////////////////////// ! // -*- C++ -*- generated by wxGlade 0.4.1 on Fri Apr 06 07:40:41 2007 ! ! #include <wx/wx.h> ! #include <wx/image.h> ! // begin wxGlade: ::dependencies ! #include <wx/notebook.h> ! #include <wx/tglbtn.h> ! // end wxGlade ! ! ! #ifndef ACTUATORCOMPONENTEDITOR_H ! #define ACTUATORCOMPONENTEDITOR_H ! ! class Actuator; ! ! class ActuatorComponentEditor: public wxDialog { ! public: ! // begin wxGlade: ActuatorComponentEditor::ids ! // end wxGlade ! ! ActuatorComponentEditor(Actuator *actuator, wxWindow* parent, int id, const wxString& title, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE); ! ! private: ! // begin wxGlade: ActuatorComponentEditor::methods ! void set_properties(); ! void do_layout(); ! // end wxGlade ! ! protected: ! // begin wxGlade: ActuatorComponentEditor::attributes ! wxStaticBox* sizer_inout_staticbox; ! wxStaticBox* sizer_actuator_properties_staticbox; ! wxStaticBox* sizer_clip_staticbox; ! wxStaticBox* sizer_basic_staticbox; ! wxStaticText* label_name; ! wxTextCtrl* txtEd_Name; ! wxStaticText* label_type; ! wxTextCtrl* txtEd_Type; ! wxStaticText* label_order; ! wxTextCtrl* txtEd_Order; ! wxCheckBox* chx_Clip; ! wxStaticText* label_clip_min; ! wxTextCtrl* txtEd_MinClip; ! wxStaticText* label_clip_max; ! wxTextCtrl* txtEd_MaxClip; ! wxStaticText* label_7; ! wxTextCtrl* txtEd_Lag; ! wxStaticText* label_10; ! wxTextCtrl* txtEd_RateLimit; ! wxStaticText* label_11; ! wxTextCtrl* txtEd_Hysteresis; ! wxStaticText* label_17; ! wxTextCtrl* txtEd_Bias; ! wxStaticText* label_1; ! wxToggleButton* button_invert_input; ! wxTextCtrl* txtEd_InputProperty; ! wxStaticText* label_output_property; ! wxTextCtrl* txtEd_OutputProperty; ! wxPanel* notebook_1_pane_1; ! wxTextCtrl* txtEd_Description; ! wxNotebook* nbk_Properties; ! wxButton* button_OK; ! wxButton* button_Cancel; ! wxButton* button_Help; ! // end wxGlade ! ! DECLARE_EVENT_TABLE(); ! ! public: ! void OnCheckboxClip(wxCommandEvent &event); // wxGlade: <event_handler> ! void OnClickInvertInput(wxCommandEvent &event); // wxGlade: <event_handler> ! void OnButtonPressOK(wxCommandEvent &event); // wxGlade: <event_handler> ! void OnButtonPressCancel(wxCommandEvent &event); // wxGlade: <event_handler> ! void OnButtonPressHelp(wxCommandEvent &event); // wxGlade: <event_handler> ! }; // wxGlade: end class ! ! ! #endif // ACTUATORCOMPONENTEDITOR_H --- 8,101 ---- ///////////////////////////////////////////////////////////////////////////// ! // -*- C++ -*- generated by wxGlade 0.4.1 on Fri Apr 06 07:40:41 2007 ! ! #ifndef ACTUATORCOMPONENTEDITOR_H ! #define ACTUATORCOMPONENTEDITOR_H ! ! #include <wx/wx.h> ! #include <wx/image.h> ! ! // begin wxGlade: ::dependencies ! #include <wx/notebook.h> ! #include <wx/tglbtn.h> ! // end wxGlade ! ! class Actuator; ! ! class ActuatorComponentEditor: public wxDialog { ! public: ! // begin wxGlade: ActuatorComponentEditor::ids ! // end wxGlade ! ! ActuatorComponentEditor(Actuator *actuator, wxWindow* parent, int id, const wxString& title, const wxPoint& pos=wxDefaultPosition, const wxSize& size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE); ! ! private: ! // begin wxGlade: ActuatorComponentEditor::methods ! void set_properties(); ! void do_layout(); ! // end wxGlade ! ! protected: ! // begin wxGlade: ActuatorComponentEditor::attributes ! wxStaticBox* sizer_inout_staticbox; ! wxStaticBox* sizer_actuator_properties_staticbox; ! wxStaticBox* sizer_clip_staticbox; ! wxStaticBox* sizer_basic_staticbox; ! wxStaticText* label_name; ! wxTextCtrl* txtEd_Name; ! wxStaticText* label_type; ! wxTextCtrl* txtEd_Type; ! wxStaticText* label_order; ! wxTextCtrl* txtEd_Order; ! wxCheckBox* chx_Clip; ! wxStaticText* label_clip_min; ! wxTextCtrl* txtEd_MinClip; ! wxStaticText* label_clip_max; ! wxTextCtrl* txtEd_MaxClip; ! wxStaticText* label_7; ! wxTextCtrl* txtEd_Lag; ! wxStaticText* label_10; ! wxTextCtrl* txtEd_RateLimit; ! wxStaticText* label_11; ! wxTextCtrl* txtEd_Hysteresis; ! wxStaticText* label_17; ! wxTextCtrl* txtEd_Bias; ! wxStaticText* label_1; ! wxToggleButton* button_invert_input; ! wxTextCtrl* txtEd_InputProperty; ! wxStaticText* label_output_property; ! wxTextCtrl* txtEd_OutputProperty; ! wxPanel* notebook_1_pane_1; ! wxTextCtrl* txtEd_Description; ! wxNotebook* nbk_Properties; ! wxButton* button_OK; ! wxButton* button_Cancel; ! wxButton* button_Help; ! // end wxGlade ! ! DECLARE_EVENT_TABLE(); ! ! public: ! void OnCheckboxClip(wxCommandEvent &event); // wxGlade: <event_handler> ! void OnClickInvertInput(wxCommandEvent &event); // wxGlade: <event_handler> ! void OnButtonPressOK(wxCommandEvent &event); // wxGlade: <event_handler> ! void OnButtonPressCancel(wxCommandEvent &event); // wxGlade: <event_handler> ! void OnButtonPressHelp(wxCommandEvent &event); // wxGlade: <event_handler> ! ! void GetDataIn(Actuator * g); ! void SetDataOut(Actuator * g); ! bool Show(bool); ! ! private: ! wxString name; ! wxString description; ! wxString order; ! bool clipable; ! wxString clip_max; ! wxString clip_min; ! ! }; // wxGlade: end class ! ! #include "actuator.h" ! ! #endif // ACTUATORCOMPONENTEDITOR_H Index: gain.h =================================================================== RCS file: /cvsroot/jsbsimcommander/src/gui/gain.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** gain.h 6 Jul 2006 07:21:59 -0000 1.2 --- gain.h 14 Apr 2007 06:02:48 -0000 1.3 *************** *** 12,19 **** #define _FCSBUILDER_GAIN_H_ ! #if defined(__GNUG__) && !defined(__APPLE__) ! // #pragma interface #endif struct MyPair { --- 12,21 ---- #define _FCSBUILDER_GAIN_H_ ! #ifndef WX_PRECOMP ! #include <wx/wx.h> #endif + #include "shape.h" + struct MyPair { *************** *** 24,31 **** WX_DECLARE_LIST(MyPair,MyPairList); - /* - * FGGAIN Componment - */ - class Gain: public ComponentShape { --- 26,29 ---- |