Develop and Download Open Source Software

Browse Subversion Repository

Contents of /old/mode.cpp

Parent Directory Parent Directory | Revision Log Revision Log


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

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