Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/CFileMode.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download) (as text)
Sun Aug 15 01:53:13 2010 UTC (13 years, 9 months ago) by okadu
File MIME type: text/x-chdr
File size: 3335 byte(s)


1 #ifndef CFILEMODE_H_INCLUDED
2 #define CFILEMODE_H_INCLUDED
3
4 #include "CStaticCtrl.h"
5 #include "CEditCtrl.h"
6 #include "CPushButton.h"
7 #include "CCheckBox.h"
8 #include "CListView.h"
9 #include "CInterfaceMode.h"
10
11 class CYesNoDialog;
12 class CInputDialog;
13 class CMultiInputDialog;
14
15 /*
16 * セーブファイルリスト要素
17 */
18 class CLayoutInfo{
19 friend class CFileMode;
20 private:
21 float m_Version; // 対応バージョン
22 string m_FileName; // ファイル名
23 string m_FileDate; // 更新日時
24 string m_FileNote; // 備考
25 public:
26 CLayoutInfo(char *fname){ m_FileName = fname; }
27 bool PreLoadSF(FILE *file);
28 bool operator<(const CLayoutInfo &rhs){ return m_FileName<rhs.m_FileName; }
29 };
30
31 // 反復子
32 typedef list<CLayoutInfo>::iterator ILayoutInfo;
33
34 /*
35 * ファイルリストビュー
36 */
37 class CFileListView: public CIconListView{
38 public:
39 bool ConfirmRename(CListElement *, string &);
40 void EndRename(CListElement *);
41 void DoubleClick();
42 };
43
44 ////////////////////////////////////////////////////////////////////////////////
45 ////////////////////////////////////////////////////////////////////////////////
46
47 /*
48 * ファイルモード
49 */
50 class CFileMode: public CInterfaceMode, public CWindowResizer, public CMenuCommander{
51 private:
52 int m_ModalState; // モーダル状態
53 int m_RedoNum; // リドゥ数
54 int m_UndoNum; // アンドゥ数
55 int m_UndoPos; // アンドゥ位置
56 bool m_NetworkMode; // ネットワークモード
57 DPNID m_DeletingMemberID; // 削除対象メンバーID
58 string m_NewFileName; // 新規ファイル名
59 string m_NetworkFileName; // ネットモードで使用するファイル名
60 CYesNoDialog *m_YesNoDialog; // yes/no ダイアログ
61 CInputDialog *m_InputDialog; // 入力ダイアログ
62 CMultiInputDialog *m_MultiInputDialog; // 複数項目入力ダイアログ
63 CPopMenu *m_FileMenu; // ファイルメニュー
64 list<CLayoutInfo> m_LayoutInfoList; // ファイルリスト
65 CWindowCtrl m_FileWindow; // 窓
66 CStaticCtrl m_FileLabel; // ファイル名ラベル
67 CStaticCtrl m_NoteLabel; // 備考ラベル
68 CEditCtrl m_NoteEdit; // 備考エディット
69 CPushButton m_NewButton; // 新規作成
70 CPushButton m_OpenButton; // 開く
71 CPushButton m_SaveButton; // 上書き保存
72 CPushButton m_SaveAsButton; // 別名で保存
73 CPushButton m_NetworkButton; // ネットワーク
74 CFileListView m_FileListView; // ファイルリストビュー
75 CCheckBox m_AutoLoadCheck; // 自動読込
76 CWindowCtrl m_NetworkWindow; // 窓
77 CStaticCtrl m_NetworkLabel; // ファイル名ラベル
78 CPushButton m_CloseEntryButton; // 受付終了ボタン
79 CPushButton m_DeleteMemberButton; // メンバ削除ボタン
80 CPushButton m_DisconnectButton; // 新規作成
81 CListView m_NetworkListView; // メンバリストビュー
82 public:
83 CFileMode();
84 ~CFileMode();
85 void WindowResized(int, int, CWindowCtrl *);
86 CPopMenu *Dispatch(CMDTYPE, DWORD);
87 char *LoadInterfaceSetting(char *);
88 void SaveInterfaceSetting(FILE *);
89 void EnterInterface();
90 void ModalFuncInterface();
91 void ScanInputInterface();
92 void ListFile();
93 void BeginNetworkHost(char *);
94 void BeginNetworkJoin(char *);
95 void SwitchNetwork(bool, bool);
96 void OpenFile(char *);
97 void SaveFile(char *);
98 void UpdateFileName();
99 void UpdateFileNote();
100 void ResetUndo();
101 void PushUndo();
102 void LoadUndo();
103 void LoadRedo();
104 };
105
106 // 外部グローバル
107 extern CFileMode *g_FileMode;
108
109 #endif

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