-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathPanelPortfolioPositionOrderExecution.h
116 lines (89 loc) · 3.66 KB
/
PanelPortfolioPositionOrderExecution.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/************************************************************************
* Copyright(c) 2011, One Unified. All rights reserved. *
* *
* This file is provided as is WITHOUT ANY WARRANTY *
* without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
* This software may not be used nor distributed without proper license *
* agreement. *
* *
* See the file LICENSE.txt for redistribution information. *
************************************************************************/
#pragma once
#include <vector>
#include <boost/shared_ptr.hpp>
#include <OUCommon/Delegate.h>
#include "VuPortfolios.h"
#include "VuPositions.h"
#include "VuOrders.h"
#include "VuExecutions.h"
#include "VuTreePortfolioPositionOrder.h"
#include "ModelPortfolioPositionOrderExecution.h"
namespace ou { // One Unified
namespace tf { // TradeFrame
#define SYMBOL_PANELPPOE_STYLE wxTAB_TRAVERSAL
#define SYMBOL_PANELPPOE_TITLE _("Portfolio Status")
#define SYMBOL_PANELPPOE_IDNAME ID_PANELPPOE
#define SYMBOL_PANELPPOE_SIZE wxSize(400, 300)
#define SYMBOL_PANELPPOE_POSITION wxDefaultPosition
class PanelPortfolioPositionOrderExecution: public wxPanel {
public:
enum ETreeContextMenuTypes {
eTreeCMPortfolioMasterAddCurrencySummary,
eTreeCMPortfolioCurrencyAddPortfolio,
eTreeCMPortfolioCurrencyAddPosition,
eTreeCMPortfolioAddPortfolio,
eTreeCMPortfolioAddPosition,
eTreeCMPositionCreateOrder,
eTreeCMPositionClosePosition,
eTreeCMOrderCancelOrder,
eTreeCMCount_
};
typedef ou::tf::ModelPortfolioPositionOrderExecution MPPOE_t;
PanelPortfolioPositionOrderExecution( MPPOE_t* pMPPOE );
PanelPortfolioPositionOrderExecution(
MPPOE_t* pMPPOE,
wxWindow* parent,
wxWindowID id = SYMBOL_PANELPPOE_IDNAME,
const wxPoint& pos = SYMBOL_PANELPPOE_POSITION,
const wxSize& size = SYMBOL_PANELPPOE_SIZE,
long style = SYMBOL_PANELPPOE_STYLE
);
virtual ~PanelPortfolioPositionOrderExecution();
bool Create(
wxWindow* parent,
wxWindowID id = SYMBOL_PANELPPOE_IDNAME,
const wxPoint& pos = SYMBOL_PANELPPOE_POSITION,
const wxSize& size = SYMBOL_PANELPPOE_SIZE,
long style = SYMBOL_PANELPPOE_STYLE
);
ou::Delegate<PanelPortfolioPositionOrderExecution*> NotifyClose;
VuTreePortfolioPositionOrder* GetTree() { return m_pDVPPOE; };
void ClickedOnTreeContextMenu( EModelType );
protected:
private:
enum { ID_Null=wxID_HIGHEST, ID_PANELPPOE
};
typedef boost::shared_ptr<wxMenu> pwxMenu_t;
typedef std::vector<pwxMenu_t> vContextMenu_t;
vContextMenu_t m_vContextMenu;
// pwxMenu_t m_pMenuTreeContextPortfolioMaster;
// pwxMenu_t m_pMenuTreeContextPortfolioCurrency;
// pwxMenu_t m_pMenuTreeContextPortfolio;
// pwxMenu_t m_pMenuTreeContextPosition;
// pwxMenu_t m_pMenuTreeContextOrder;
VuPortfolios* m_pDVPortfolios;
VuPositions* m_pDVPositions;
VuOrders* m_pDVOrders;
VuExecutions* m_pDVExecutions;
VuTreePortfolioPositionOrder* m_pDVPPOE;
ou::tf::ModelPortfolioPositionOrderExecution* m_pMPPOE;
void Init( void );
void CreateControls( void );
bool ShowToolTips( void ) { return true; };
void OnFocusChange( wxFocusEvent& event );
void OnClose( wxCloseEvent& event );
};
} // namespace tf
} // namespace ou