forked from Corran-Raisu/FLCompanion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FLCompanionDlg.h
178 lines (163 loc) · 5.32 KB
/
FLCompanionDlg.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
// FLCompanionDlg.h : header file
//
#if !defined(AFX_FLCOMPANIONDLG_H__6D763B2E_AAC2_45DD_BA3A_FE9ED46D3937__INCLUDED_)
#define AFX_FLCOMPANIONDLG_H__6D763B2E_AAC2_45DD_BA3A_FE9ED46D3937__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "System.h"
#include "WndResizer.h"
#define WM_RECALC (WM_APP+2)
/////////////////////////////////////////////////////////////////////////////
// CFLCompanionDlg dialog
class CFLCompanionDlg : public CDialog
{
// Construction
public:
CFLCompanionDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CFLCompanionDlg)
enum { IDD = IDD_FLCOMPANION_DIALOG };
CButton m_switchBtn;
CButton m_jumpsBtn;
CButton m_mapBtn;
CButton m_backBtn;
CButton m_TRaddBtn;
CButton m_TRremBtn;
CComboBox m_asteroidsCombo;
CListCtrl m_systemWaypoints;
CComboBox m_destsystemCombo;
CComboBox m_destbaseCombo;
CListCtrl m_waypoints;
CComboBox m_systemCombo;
CListCtrl m_routes;
CComboBox m_baseCombo;
CListCtrl m_traderoute;
CComboBox m_SrcDestSwitch;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CFLCompanionDlg)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
virtual void WinHelp(DWORD dwData, UINT nCmd = HELP_CONTEXT);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CFLCompanionDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSize(UINT nType, int cx, int cy);
void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnSelchangeBaseCombo();
afx_msg void OnItemclickRoutes(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnItemactivateRoutes(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnItemactivateWaypoints(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSelchangeSystemCombo();
afx_msg void OnSelchangeSrcDestCombo();
afx_msg void OnBack();
afx_msg void OnItemchangedRoutes(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnTRItemchangedRoutes(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnItemchangedWaypoints(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSelchangeDestsystemCombo();
afx_msg void OnSelchangeDestbaseCombo();
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnBegintrackRoutes(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDumpBaseTimes();
afx_msg void OnDumpSolutions();
afx_msg void OnBaseInfo();
afx_msg void OnGoodsRepo();
afx_msg void OnAbout();
afx_msg void OnVisitForum();
afx_msg void OnVersionHistory();
afx_msg void OnSetFLDir();
afx_msg void OnSwitchNicknames();
afx_msg void OnSpeedDelays();
afx_msg void OnLimitations();
afx_msg void OnUpdateNicknames(CCmdUI* pCmdUI);
afx_msg void OnVisitWebsite();
afx_msg void OnSystemMap();
afx_msg void ShowHideLog();
afx_msg void OnMining();
afx_msg void OnSelchangeAsteroidsCombo();
afx_msg void OnUpdateGameLaunch(CCmdUI* pCmdUI);
afx_msg void OnGameLaunch();
afx_msg void OnModInfo();
afx_msg void OnUpdateModInfo(CCmdUI* pCmdUI);
afx_msg void OnJumps();
afx_msg void OnMap();
afx_msg void OnUpdateGameImport(CCmdUI* pCmdUI);
afx_msg void OnGameImportAbout();
afx_msg void OnGameImport(UINT nID);
afx_msg void OnGameImportCheckall();
afx_msg void OnRefreshClient();
afx_msg void OnUpdateGameImportCheckall(CCmdUI* pCmdUI);
afx_msg void OnActivateApp(BOOL bActive, DWORD hTask);
afx_msg void OnSwitch();
afx_msg void OnTR_Add();
afx_msg void OnTR_Rem();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
afx_msg void OnInitMenuPopup(CMenu *pPopupMenu, UINT nIndex,BOOL bSysMenu);
afx_msg LRESULT OnRecalc(WPARAM, LPARAM);
public:
enum {
RECALC_SOLUTIONS = 0x01,
RECALC_PATHS = 0x02,
};
void Recalc(DWORD flags);
BOOL SetMaxInvestment(UINT investment);
BOOL SetMaxDistance(UINT distance);
BOOL SetJumpTradeTime(UINT jumptradeTime);
BOOL SetMinCSU(UINT minCSU);
BOOL SetCargoSize(UINT cargoSize);
private:
static int SelComboByData(CComboBox &combo, void *selData);
void DrawMap(CDC &dc);
void LoadMaps();
void MatchGates();
void CalcDistances();
void ResetMapZoom();
void ShowAllSolutions();
void AddSolutionsForBase(CBase* base);
void AddSolution(int goodIndex, double destbuy, double srcsell, CBase *srcbase, CBase *destbase, LONG distance);
void JumptoBase(CBase *base);
void InitSystemCombos();
void ImportFromGame();
void Calc_TotalRow();
public:
BOOL m_displayNicknames;
UINT m_cargoSize;
CString m_version;
int SelectedItem;
int g_traderouteTotal;
int g_traderouteTotalHour;
private:
HACCEL m_hAccel;
UINT m_maxInvestment;
UINT m_maxDistance;
UINT m_jumptradeTime;
UINT m_minCSU;
BOOL m_showAllSolutions;
CAsteroids* m_curAsteroids;
CList<CBase*,CBase*> m_history;
CPoint m_mapMouseCoords;
int m_mapmax;
CPoint m_mapOrigin;
int m_zoom;
CSystem *m_drawnSystem;
DWORD m_importFromGame;
LONG m_recalcFlags;
};
extern CFLCompanionDlg* g_mainDlg;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_FLCOMPANIONDLG_H__6D763B2E_AAC2_45DD_BA3A_FE9ED46D3937__INCLUDED_)