Develop and Download Open Source Software

Browse Subversion Repository

Contents of /filemv/mode.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 37 - (show annotations) (download)
Tue Mar 11 03:36:01 2008 UTC (16 years, 2 months ago) by tabasa
File MIME type: text/plain
File size: 1550 byte(s)


1
2 #include "defextern.h"
3
4 #ifndef STRICT
5 #define STRICT
6 #endif
7 #include <windows.h>
8 #include "mes.h"
9 #include "mode.h"
10 #include "edit.h"
11 #include "initial.h"
12 #include "paintflag.h"
13 #include "myfilemv.h"
14
15 void DirEditSw()
16 {
17 if( DirEditMode == _HIDE ) DirEditMode =_SHOW;
18 else DirEditMode =_HIDE;
19 }
20 void buttonSw()
21 {
22 if( ButtonMode == _HIDE ) ButtonMode =_SHOW;
23 else ButtonMode =_HIDE;
24 }
25
26 void MemoOff(HWND hEdit)
27 {
28 if( MemoMode == _ON )
29 {
30 saveMemo(hEdit);
31 }
32 MemoMode = _OFF;
33 }
34 void MemoOff()
35 {
36 MemoOff(getMainEdit());
37 }
38
39 void MemoSw(HWND hEdit)
40 {
41 static int lastmode;
42 if( MemoMode == _ON )
43 {
44 saveMemo(hEdit);
45 MemoMode = _OFF;
46 mode = lastmode;
47 }
48 else
49 {
50 loadMemo(hEdit);
51 MemoMode = _ON;
52 lastmode = mode;
53 mode=W_MODE_EDITONLY;
54 }
55 }
56
57 void initmode()
58 {
59 mode =W_MODE_INIT;
60 ButtonMode =_SHOW;
61 DirEditMode =_SHOW;
62 MemoMode = _OFF;
63 LeftTreeMode = _OFF;
64 }
65
66 void treemode()
67 {
68 LeftTreeMode = _ON;
69 }
70
71 void setmode(int i)
72 {
73 if(i>=W_MODE_MIN && i<=W_MODE_MAX ) mode=i;
74 }
75
76 void widemode()
77 {
78 MemoOff();
79 //mode =W_MODE_LIST;
80 ButtonMode =_HIDE;
81 showmenu =FALSE;
82 }
83
84 void editmode()
85 {
86 MemoOff();
87 mode=W_MODE_LISTnEDIT;
88 }
89 void editonlymode()
90 {
91 MemoOff();
92 mode=W_MODE_EDITONLY;
93 }
94
95 void listmode()
96 {
97 MemoOff();
98 mode=W_MODE_LIST;
99 }
100
101 void nextwinmode(int plus)
102 {
103 MemoOff();
104 mode +=plus;
105 if(mode >W_MODE_MAX) mode =W_MODE_MIN;
106 if(mode <W_MODE_MIN) mode =W_MODE_MAX;
107 }
108
109
110 void resetshowpic()
111 {
112 picshowflg =FALSE;
113 CurrentPicshow =FALSE;
114 bmpflg =FALSE;
115 isPicflg =FALSE;
116 }
117
118 void memomode(HWND hEdit)
119 {
120 MemoSw(hEdit);
121 }
122

Properties

Name Value
svn:eol-style native
svn:keywords Id Revision
svn:mime-type text/plain

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