00001
00002
00003 #include <vector>
00004
00005 #include <wx/wx.h>
00006 #include <wx/image.h>
00007
00008 #include "../ProblemWithPenalty.h"
00009
00010 #include "ConstraintsPanel.h"
00011
00012 #ifndef PROBLEMWITHPENALTYPANEL_H
00013 #define PROBLEMWITHPENALTYPANEL_H
00014
00015
00016 class ProblemWithPenaltyPanel
00017 : public wxPanel
00018 {
00019 friend class ProblemWithPenaltyValidator;
00020 friend class PwpAdvancedDialog;
00021
00022 public:
00023
00024 enum {
00025
00026
00027 ID_ADVANCED
00028 };
00029
00030 ProblemWithPenaltyPanel(wxWindow* parent,
00031 int id,
00032 ProblemWithPenalty* pProblem,
00033 const wxPoint& pos=wxDefaultPosition,
00034 const wxSize& size=wxDefaultSize,
00035 long style=0);
00036
00037
00038 vector<Constraint>& rConstraints();
00039
00040
00041
00042 void OnAdvanced(wxCommandEvent& event);
00043
00044 private:
00045
00046 void set_properties();
00047 void do_layout();
00048
00049 ProblemWithPenalty* mpProblem;
00050 CountedPtr<const FunctionBase> mcpFunction;
00051 CountedPtr<const VariableNames> mcpVariables;
00052 vector<Constraint> mConstraints;
00053
00056 static wxPanel* CreatePanel(ProblemBase* pProblem, wxWindow* pParent);
00057
00058 static const void* mpRegistrationDummy;
00059
00060 protected:
00061
00062 PenaltyFunction::OutOfBoundsReactionType mReactionChosen;
00063
00064 wxChoice* mpTypeChoice;
00065 wxButton* mpAdvancedButton;
00066 ConstraintsPanel* mpConstraintsPanel;
00067
00068 DECLARE_EVENT_TABLE()
00069 };
00070
00071
00072 #endif // PROBLEMWITHPENALTYPANEL_H