- Timestamp:
- 05/07/07 20:30:51 (2 years ago)
- Files:
-
- branches/poseidon/poseidon/controller/bottompanel.d (modified) (1 diff)
- branches/poseidon/poseidon/controller/editor.d (modified) (5 diffs)
- branches/poseidon/poseidon/controller/scintillaex.d (modified) (4 diffs)
- branches/poseidon/poseidon/loader.d (modified) (2 diffs)
- branches/poseidon/poseidon/scintilla.d (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/poseidon/poseidon/controller/bottompanel.d
r350 r351 149 149 class TextEx : Text { 150 150 151 override void checkSubclass(){ 152 } 153 151 154 public this (Composite parent, int style) 152 155 { branches/poseidon/poseidon/controller/editor.d
r350 r351 137 137 this(SashForm parent) 138 138 { 139 Stdout.formatln( "{} {}", __FILE__, __LINE__ );140 139 super(parent, SWT.TOP | SWT.CLOSE | SWT.H_SCROLL | SWT.BORDER); 141 140 pthis = this; … … 164 163 }); 165 164 166 Stdout.formatln( "{} {}", __FILE__, __LINE__ );167 165 findDlg = new FindDlg(getShell(), this); 168 Stdout.formatln( "{} {}", __FILE__, __LINE__ );169 166 findDlg.setImage( Globals.getImage( "find" ) ); // Set Icon 170 Stdout.formatln( "{} {}", __FILE__, __LINE__ );171 167 // create the invisible scintilla for search and replace 172 168 invisibleSC = new ScintillaEx(sShell, SWT.NONE); 173 Stdout.formatln( "{} {}", __FILE__, __LINE__ );174 169 // don't collect undo actions 175 170 invisibleSC.setUndoCollection(false); 176 Stdout.formatln( "{} {}", __FILE__, __LINE__ );177 171 178 172 GridData gdata = new GridData(); … … 181 175 invisibleSC.setVisible(false); 182 176 183 Stdout.formatln( "{} {}", __FILE__, __LINE__ );184 177 updateI18N(); 185 178 186 Stdout.formatln( "{} {}", __FILE__, __LINE__ );187 179 // install the Shell's event handler to check ExternModify 188 180 sShell.handleEvent(null, SWT.Activate, delegate(Event e) { … … 190 182 }); 191 183 192 Stdout.formatln( "{} {}", __FILE__, __LINE__ );193 184 private_method_xpm = getXpm( "images\\obj16\\xpm\\function_private_obj.xpm"); 194 185 protected_method_xpm = getXpm( "images\\obj16\\xpm\\function_protected_obj.xpm" ); … … 220 211 enum_member_obj_xpm = getXpm( "images\\obj16\\xpm\\enum_member_obj.xpm" ); 221 212 template_obj_xpm = getXpm( "images\\obj16\\xpm\\template_obj.xpm" ); 222 Stdout.formatln( "{} {}", __FILE__, __LINE__ );223 213 } 224 214 branches/poseidon/poseidon/controller/scintillaex.d
r350 r351 28 28 public this(Composite parent, int style){ 29 29 30 Stdout.formatln( "{} {}", __FILE__, __LINE__ );31 30 setDllFileName("scilexer.dll"); 32 Stdout.formatln( "{} {}", __FILE__, __LINE__ );33 31 34 32 super(parent, style); 35 Stdout.formatln( "{} {}", __FILE__, __LINE__ );36 33 37 34 init(); 38 Stdout.formatln( "{} {}", __FILE__, __LINE__ );39 35 40 36 handleNotify(null, SCN_UPDATEUI, &onUpdateUI); 41 37 handleNotify(null, SCN_MARGINCLICK, &onMarginClick); 42 38 handleNotify(null, SCN_CHARADDED, &onCharAdded); 43 Stdout.formatln( "{} {}", __FILE__, __LINE__ );44 39 } 45 40 … … 162 157 163 158 public void init(){ 164 Stdout.formatln( "{} {}", __FILE__, __LINE__ );165 159 166 160 setCodePage(SC_CP_UTF8); 167 161 168 Stdout.formatln( "{} {}", __FILE__, __LINE__ );169 162 // F3 170 163 // F4 … … 187 180 clearCmdKey('Y' + (SCMOD_CTRL << 16)); 188 181 clearCmdKey('Z' + (SCMOD_CTRL << 16)); 189 Stdout.formatln( "{} {}", __FILE__, __LINE__ );190 182 191 183 … … 263 255 assignCmdKey(SCK_DIVIDE + (SCMOD_CTRL << 16), SCI_SETZOOM); 264 256 */ 265 Stdout.formatln( "{} {}", __FILE__, __LINE__ );266 257 } 267 258 /** Scintilla default key mapping in C++ branches/poseidon/poseidon/loader.d
r350 r351 6 6 private import poseidon.globals; 7 7 private import poseidon.controller.dialog.splash; 8 import poseidon.scintilla; 8 9 9 10 import tango.io.Stdout; 10 11 11 version = TRACKING;12 //version = TRACKING; 12 13 13 14 class Loader { … … 34 35 //display = Display.getDefault(); 35 36 shell = new Shell(display); 36 37 //auto com = new Composite( shell, SWT.NONE ); 38 //Stdout.formatln( "{} {} ", __FILE__, __LINE__ ); 39 //auto sc = new Scintilla( shell, SWT.NONE ); 40 //Stdout.formatln( "{} {} ", __FILE__, __LINE__ ); 37 41 38 42 // show splash screen if desired branches/poseidon/poseidon/scintilla.d
r350 r351 65 65 alias int BOOL; 66 66 import poseidon.converter; 67 import poseidon.utility; 67 68 /** 68 69 * Describes a range for a search, a search pattern, and a range for the search result. … … 1914 1915 private static void staticCtor() { 1915 1916 if(_handleOfDLL !is 0) return; 1916 if(dllToUse is null) 1917 if(dllToUse is null){ 1917 1918 dllToUse = ScintillaDll; 1918 _handleOfDLL = OS.LoadLibrary( new TCHAR( 0, String.fromUtf8(dllToUse), true )); 1919 } 1920 _handleOfDLL = OS.LoadLibrary( new TCHAR( 0, String.fromUtf8(dllToUse), true )); 1919 1921 1920 1922 // try to load standard 1921 if(_handleOfDLL is 0) 1923 if(_handleOfDLL is 0){ 1922 1924 _handleOfDLL = OS.LoadLibrary( new TCHAR( 0, String.fromUtf8(ScintillaDll), true )); 1923 if(_handleOfDLL is 0) 1925 } 1926 if(_handleOfDLL is 0){ 1924 1927 _handleOfDLL = OS.LoadLibrary( new TCHAR( 0, String.fromUtf8("Scintilla.dll\0"), true )); 1925 1928 } 1929 1926 1930 if(_handleOfDLL is 0){ 1927 1931 char[] errStr = Display.getDefault.dh_getLastErrorText(); 1928 1932 errStr ~= "\nLoadLibrary Failed : " ~ dllToUse; 1929 auto mb = new MessageBox( null, SWT.OK|SWT.ICON_ERROR | SWT.APPLICATION_MODAL );1930 mb.dh_setText( "Error" );1931 mb.dh_setMessage( errStr );1932 //MessageBox.showMsg(errStr[], "Error", null,);1933 auto mb = new MessageBox( null, SWT.OK|SWT.ICON_ERROR | SWT.APPLICATION_MODAL ); 1934 mb.dh_setText( "Error" ); 1935 mb.dh_setMessage( errStr ); 1936 MessageBox_showMessage(errStr, "Error", null ); 1933 1937 return; 1934 1938 } 1935 1939 1936 1940 assert(_handleOfDLL); 1937 ScintillaClass = new TCHAR( 0, new String( "ScintillaClass" ), true); 1938 WNDCLASS lpWndClass = new WNDCLASS; 1939 OS.GetClassInfo( 0, ScintillaClass, lpWndClass); 1940 ScintillaProc = lpWndClass.lpfnWndProc; 1941 ScintillaClass = new TCHAR( 0, String.fromUtf8( ScintillaClassName ), true); 1942 WNDCLASS lpWndClass = new WNDCLASS; 1943 bool res = OS.GetClassInfo( 0, ScintillaClass, lpWndClass); 1944 assert( res ); 1945 ScintillaProc = lpWndClass.lpfnWndProc; 1941 1946 } 1942 1947 1943 1948 this (Composite parent, int style) { 1944 Stdout.formatln( "{} {}", __FILE__, __LINE__ );1945 1949 assert(parent); 1946 1950 staticCtor(); 1947 1951 Display disp = parent.getDisplay(); 1948 1952 DeviceData info = disp.getDeviceData (); 1949 Stdout.formatln( "{} {} {}", __FILE__, __LINE__, info.tracking );1950 Stdout.formatln( "{} {} objs:{} errs:{}", __FILE__, __LINE__, info.objects.length, info.errors.length );1951 1952 1953 super(parent, style | SWT.V_SCROLL | SWT.H_SCROLL); 1953 Stdout.formatln( "{} {}", __FILE__, __LINE__ );1954 1954 1955 1955 if(handle !is 0) { 1956 1956 directFunction = getDirectFunction(); 1957 1957 directPointer = getDirectPointer(); 1958 Stdout.formatln( "{} {}", __FILE__, __LINE__ );1959 1958 1960 1959 // increase the instance count … … 1968 1967 } 1969 1968 }); 1970 Stdout.formatln( "{} {}", __FILE__, __LINE__ );1971 1969 1972 1970 // when the display disposed, check the instance count … … 1983 1981 } 1984 1982 1985 Stdout.formatln( "{} {}", __FILE__, __LINE__ );1986 1983 } 1987 1984 … … 1994 1991 static int handleOfDLL() { return cast(int)_handleOfDLL; } 1995 1992 1996 public int callWindowProc(int msg, int wParam, int lParam ){1993 public override int callWindowProc( int hwnd, int msg, int wParam, int lParam ){ 1997 1994 if (handle is 0 ) return 0; 1998 1995 return OS.CallWindowProc( ScintillaProc, handle, msg, wParam, lParam); … … 2012 2009 } 2013 2010 2014 int windowProc2 () { 2015 return ScintillaProc; 2016 } 2017 2018 int widgetStyle () { 2011 override int widgetStyle () { 2019 2012 int bits = super.widgetStyle (); 2020 2013 bits |= OS.WS_TABSTOP;
