Antares Simulator
Power System Simulator
Loading...
Searching...
No Matches
bindingconstraint.h
1/*
2** Copyright 2007-2024, RTE (https://www.rte-france.com)
3** See AUTHORS.txt
4** SPDX-License-Identifier: MPL-2.0
5** This file is part of Antares-Simulator,
6** Adequacy and Performance assessment for interconnected energy networks.
7**
8** Antares_Simulator is free software: you can redistribute it and/or modify
9** it under the terms of the Mozilla Public Licence 2.0 as published by
10** the Mozilla Foundation, either version 2 of the License, or
11** (at your option) any later version.
12**
13** Antares_Simulator is distributed in the hope that it will be useful,
14** but WITHOUT ANY WARRANTY; without even the implied warranty of
15** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16** Mozilla Public Licence 2.0 for more details.
17**
18** You should have received a copy of the Mozilla Public Licence 2.0
19** along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
20*/
21#ifndef __ANTARES_APPLICATION_WINDOW_BINDING_CONSTRAINT_H__
22#define __ANTARES_APPLICATION_WINDOW_BINDING_CONSTRAINT_H__
23
24#include "../../toolbox/components/notebook/notebook.h"
25#include "../../toolbox/components/datagrid/component.h"
26#include "../../toolbox/input/bindingconstraint.h"
27#include <ui/common/component/panel.h>
28
29namespace Antares
30{
31namespace Window
32{
33class BindingConstraintWeightsPanel;
34class BindingConstraintOffsetsPanel;
35
39class BindingConstraint : public Component::Panel, public Yuni::IEventObserver<BindingConstraint>
40{
41public:
43
44
49 BindingConstraint(wxWindow* parent);
51 virtual ~BindingConstraint();
53
54 void selectDefaultPage();
55
56private:
57 void onPageChanged(Component::Notebook::Page& page);
58
59 void onSelectedConstraint(Data::BindingConstraint* contraint);
60 void onDblClickConstraint(Data::BindingConstraint* contraint);
61
62 void onAdd(void*);
63 void onAddFromMouse(wxMouseEvent&);
64 void onDelete(void*);
65 void onDeleteFromMouse(wxMouseEvent&);
66 void onEdit(void*);
67 void onDeleteAll(void*);
68 void onEditFromMouse(wxMouseEvent&);
69
70private:
72 Component::Notebook::Page* pPageWeights;
73 Component::Notebook::Page* pPageOffsets;
75 Data::BindingConstraint* pSelected;
76
77 BindingConstraintWeightsPanel* pWeightsPanel;
78 BindingConstraintOffsetsPanel* pOffsetsPanel;
79
80public:
81 // Event table
82 DECLARE_EVENT_TABLE()
83
84}; // class BindingConstraint
85
86} // namespace Window
87} // namespace Antares
88
89#endif // __ANTARES_APPLICATION_WINDOW_BINDING_CONSTRAINT_H__
Definition notebook.h:62
Panel implementation.
Definition panel.h:36
Definition BindingConstraint.h:49
Definition bindingconstraint.cpp:146
Definition bindingconstraint.cpp:54
Settings for a single Binding constraint.
Definition bindingconstraint.h:40
virtual ~BindingConstraint()
Destructor.
Definition bindingconstraint.cpp:340
BindingConstraint(wxWindow *parent)
Constructor.
Definition bindingconstraint.cpp:235