Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/CDiaDialog.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9 - (show annotations) (download) (as text)
Tue Aug 28 14:58:05 2012 UTC (11 years, 8 months ago) by okadu
File MIME type: text/x-chdr
File size: 3335 byte(s)
[okadu] Version 2.14
ニュートラル画面分割
ダイヤ停車位置の数値設定
レイアウト読み込みバグ一部修正

1 #ifndef CDIADIALOG_H_INCLUDED
2 #define CDIADIALOG_H_INCLUDED
3
4 #include "CWindowCtrl.h"
5 #include "CCheckBox.h"
6 #include "CRadioButton.h"
7 #include "CStaticCtrl.h"
8 #include "CGroupBox.h"
9 #include "CEditCtrl.h"
10 #include "CTrainListView.h"
11
12 class CRailConnector;
13 class CStation;
14 class CDiaElementBase;
15 class CDiaListBase;
16 class CDiaInstBase;
17 class CPointElement;
18 class CDiaElement;
19
20 /*
21 * ダイヤ関連ダイアログ基本クラス
22 */
23 class CDiaDialogBase: public CWindowCtrl, public CWindowResizer, public CMenuCommander{
24 protected:
25 int m_ExtHeight; // 拡張領域高さ
26 CStaticCtrl m_NameLabel; // 名称ラベル
27 CEditCtrl m_NameEdit; // 名称エディット
28 CGroupListView m_GroupListView; // 編成リスト
29 CPopMenu *m_GroupMenu; // 編成メニュー
30 CCheckBox m_UseDefault; // デフォルト設定を使用
31 CStaticCtrl m_DefaultLabel; // デフォルト選択時ラベル
32 CListView m_RoutineListView; // ルーチンリスト
33 CPopMenu *m_RoutineMenu; // ルーチンメニュー
34 CPushButton m_RoutineAdd; // 追加
35 CPushButton m_RoutineDelete; // 削除
36 CPushButton m_RoutinePrev; // ひとつ戻す
37 CPushButton m_RoutineNext; // ひとつ送る
38 CGroupBox m_DiaGroup; // 設定グループ
39 CPushButton m_ApplyButton; // 適用ボタン
40 CDiaInstBase *m_DiaInst; // ダイヤインスタンス
41 CDiaListBase *m_DiaList; // ルーチン
42 CDiaElementBase *m_DiaElement; // 編集中ダイヤ要素
43 public:
44 CDiaDialogBase();
45 ~CDiaDialogBase();
46 void Init(int, int, int, int, char *, CInterface *, char *, int);
47 void InitFoot();
48 void WindowResized(int, int, CWindowCtrl *);
49 virtual void ResizeDiaDialogBase(int, int) = 0;
50 CPopMenu *Dispatch(CMDTYPE, DWORD);
51 void Enter(CDiaInstBase *);
52 void SetTrainGroup(CTrainGroup *);
53 void SetDiaElementBase(CDiaElementBase *);
54 void ScanInputDia();
55 void AddRoutine();
56 void DeleteRoutine();
57 void RotateRoutine(bool);
58 virtual void ScanInputDiaDialogBase() = 0;
59 void RenderWindow(){ RenderDiaDialogBase(); }
60 virtual void RenderDiaDialogBase(){}
61 virtual void SetElementValue(CDiaElementBase *) = 0;
62 };
63
64 #define CDIADIALOGBASE_CASTFUNC(el) \
65 el *GetElement(){ return m_DiaElement ? (el *)m_DiaElement : NULL; }
66
67 /*
68 * ポイント切替ダイアログ
69 */
70 class CPointDialog: public CDiaDialogBase{
71 private:
72 CRadioButton m_Point[3]; // ポイントラジオ
73 public:
74 void Init(CInterface *);
75 void ResizeDiaDialogBase(int, int);
76 void ScanInputDiaDialogBase();
77 void SetElementValue(CDiaElementBase *);
78 CDIADIALOGBASE_CASTFUNC(CPointElement);
79 };
80
81 /*
82 * ダイヤ設定ダイアログ
83 */
84 class CDiaDialog: public CDiaDialogBase{
85 private:
86 int m_OffsetSlide; // オフセットスライダ状態
87 CRadioButton m_Action[3]; // 動作ラジオ
88 CRadioButton m_TimeType[2]; // 時間ラジオ
89 CEditCtrl m_HourEdit; // 時ラベル
90 CStaticCtrl m_HourLabel; // 時エディット
91 CEditCtrl m_MinuteEdit; // 分エディット
92 CStaticCtrl m_MinuteLabel; // 分ラベル
93 CEditCtrl m_SecondEdit; // 秒エディット
94 CStaticCtrl m_SecondLabel; // 秒ラベル
95 CEditCtrl m_StopPosEdit; // 停車位置エディット
96 CPushButton m_StopPosButton; // 停車位置反映ボタン
97 // CCheckBox m_JointCheck; // 連結チェック
98 public:
99 void Init(CInterface *);
100 void ResizeDiaDialogBase(int, int);
101 void ScanInputDiaDialogBase();
102 void RenderDiaDialogBase();
103 void SetElementValue(CDiaElementBase *);
104 CDIADIALOGBASE_CASTFUNC(CDiaElement);
105 };
106
107 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26