From: Ezra B. <ezr...@us...> - 2009-04-10 16:46:30
|
Update of /cvsroot/win32forth/win32forth/apps/Win32ForthIDE In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16955/apps/Win32ForthIDE Modified Files: FORMPROPERTY.F ScintillaMDI.f Log Message: IDE Enhancements. Bug Fixes. Doc Updates. Index: FORMPROPERTY.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/FORMPROPERTY.F,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FORMPROPERTY.F 4 May 2008 18:13:25 -0000 1.2 --- FORMPROPERTY.F 10 Apr 2009 16:46:26 -0000 1.3 *************** *** 2,11 **** load-bitmap savebmp1 "save1.bmp" load-bitmap savebmp2 "save2.bmp" ! load-bitmap stopbmp1 "stop1.bmp" ! load-bitmap stopbmp2 "stop2.bmp" ! ! \ The following not working from within the TabControl form, just a litle help info ! \ s" When a control or form is selected display its property" BInfo: chkAutoProperty place ! \ s" Add only one selected control when form is clicked" BInfo: chkSingleControl place : GetBitmap ( -- ) --- 2,7 ---- load-bitmap savebmp1 "save1.bmp" load-bitmap savebmp2 "save2.bmp" ! \ load-bitmap stopbmp1 "stop1.bmp" ! \ load-bitmap stopbmp2 "stop2.bmp" : GetBitmap ( -- ) *************** *** 54,57 **** --- 50,59 ---- then Check: chkSpinner ; + : Fill-IDList ( -- ) + Clear: cmblstIDs + #ids 0 + do i GetID$ asciiz AddStringTo: cmblstIDs + loop ID: eActiveControl check-id SetSelection: cmblstIDs ; + : LoadProperties ( -- ) GetName: eActiveControl SetText: txtName *************** *** 66,69 **** --- 68,73 ---- Global?: eActiveControl Check: chkGlobal ?EnableSpinner + Fill-IDList + GetType: eActiveControl font-type? Enable: btnChangeFont GetType: eActiveControl dup TypeBitmapButton = swap TypeStaticBitmap = or *************** *** 75,79 **** true Enable: txtBitmap true Enable: btnBrowse ! else \ first clear any previous orientation selection UnCheckButton: radLeft UnCheckButton: radCenter --- 79,83 ---- true Enable: txtBitmap true Enable: btnBrowse ! else \ first clear any previous orientation sel ection UnCheckButton: radLeft UnCheckButton: radCenter *************** *** 97,102 **** eActiveForm ?FormNumber 0= ?exit \ form no longer exists eActiveControl ?ControlNumber: eActiveForm 0= ?exit - Origin: eActiveControl to y to x - Dimensions: eActiveControl to h to w GetText: txtName SetName: eActiveControl GetText: txtCaption SetTitle: eActiveControl --- 101,104 ---- *************** *** 111,115 **** GetType: eActiveControl TypeTextBox = if IsButtonChecked?: chkSpinner IsSpinner: eActiveControl ! then \ justification IsTypeButton? --- 113,117 ---- GetType: eActiveControl TypeTextBox = if IsButtonChecked?: chkSpinner IsSpinner: eActiveControl ! then GetCurrent: cmblstIDs IsID: eActiveControl \ justification IsTypeButton? *************** *** 130,141 **** Update: eActiveControl \ everything UpdateStatus: eActiveForm \ at this time ! Paint: eActiveForm ; \ and refresh display : initload ( -- ) ActiveControl: ActiveForm to eActiveControl ActiveForm to eActiveForm ! eActiveControl 0= ?exit ! LoadProperties \ initialize form ! ; : doPrevious ( -- ) \ cycle through controls in current form --- 132,157 ---- Update: eActiveControl \ everything UpdateStatus: eActiveForm \ at this time ! Paint: eActiveForm \ and refresh display ! doUpdate ; ! ! : ClearControlProperties ( -- ) ! s" No control selected!" SetText: txtName ! s" " ! 2dup SetText: txtCaption ! 2dup SetText: txtTooltip ! SetText: txtBitmap ! Disable: btnChangeFont ; : initload ( -- ) + ActiveForm 0= ?exit ActiveControl: ActiveForm to eActiveControl ActiveForm to eActiveForm ! eActiveControl ! if LoadProperties ! else ClearControlProperties ! then RefreshCodeWindow ! eActiveControl ! if ControlCode: eActiveControl Highlight-Code ! then ; : doPrevious ( -- ) \ cycle through controls in current form *************** *** 171,174 **** --- 187,193 ---- UpdatePropertyWindow ; + : doEditCode ( -- ) + FLAG_CODE RefreshActiveCoder ; + : PropertyFunc ( h m w l id obj -- h m w l ) { cid obj -- } *************** *** 180,188 **** GetID: btnNext of doNext endof ! IDCANCEL of Close: obj endof endcase ; :Noname ( -- ) ! frmEditProperties.hwnd 0= ?exit \ window is not open \ Remove comment from the following if you will need to save the properties first \ If you do and you are just browsing controls the form(s) will be marked as --- 199,209 ---- GetID: btnNext of doNext endof ! GetID: btnChangeFont ! of GetUserFont: eActiveControl ! endof endcase ; :Noname ( -- ) ! \ GetHandle: frmEditProperties 0= ?exit \ window is not open \ Remove comment from the following if you will need to save the properties first \ If you do and you are just browsing controls the form(s) will be marked as *************** *** 195,200 **** :Object frmEditForm <Super frmEditFormProperties :M LoadProperties: ( -- ) ! FormName: ActiveForm count SetText: txtName FormTitle: ActiveForm count SetText: txtTitle Origin: ActiveForm SetValue: spnYpos --- 216,240 ---- :Object frmEditForm <Super frmEditFormProperties + :M ClearFormProperties: ( -- ) + s" No form opened!" SetText: txtName + s" " SetText: txtTitle + 1 SetValue: spnXpos + 1 SetValue: spnYpos + 1 SetValue: spnWidth + 1 SetValue: spnHeight + false + dup Check: chkModal + dup Check: chkSave + dup Check: chkChildState + dup Check: chkStatusBar + dup Check: radChildWindow + dup Check: radMDIDialogWindow + Check: radDialogWindow + ;M + :M LoadProperties: ( -- ) ! ActiveForm 0= ! if ClearFormProperties: self exitm ! then FormName: ActiveForm count SetText: txtName FormTitle: ActiveForm count SetText: txtTitle Origin: ActiveForm SetValue: spnYpos *************** *** 222,228 **** UnCheckButton: radChildWindow false Enable: chkChildState ! endcase ;M :M SaveProperties: { \ x y w h -- } Origin: ActiveForm to y to x Dimensions: ActiveForm to h to w --- 262,270 ---- UnCheckButton: radChildWindow false Enable: chkChildState ! endcase ! ;M :M SaveProperties: { \ x y w h -- } + ActiveForm 0= ?exitm Origin: ActiveForm to y to x Dimensions: ActiveForm to h to w *************** *** 280,283 **** --- 322,330 ---- imagebutton btnclose + :M Clear: ( -- ) + ClearFormProperties: frmEditForm + ClearControlProperties + ;M + : ontab { l obj -- } GetSelectedTab: obj *************** *** 292,298 **** Hide: frmEditForm Display: frmAction endof ! endcase LoadProperties: frmEditForm ; : ?apply ( -- ) Locked?: ActiveForm ?exitm GetSelectedTab: TabProperties --- 339,347 ---- Hide: frmEditForm Display: frmAction endof ! endcase LoadProperties: frmEditForm ! ; : ?apply ( -- ) + ActiveForm 0= ?exit Locked?: ActiveForm ?exitm GetSelectedTab: TabProperties *************** *** 312,316 **** case IDOK of ?apply endof - IDCANCEL of Close: self endof endcase ; --- 361,364 ---- *************** *** 320,329 **** IDCANCEL SetID: btnClose ! TCS_BUTTONS TCS_FLATBUTTONS or AddStyle: TabProperties On_Init: Super self Start: btnApply ! btnApplyX btnApplyY btnApplyW btnApplyH Move: btnApply savebmp2 usebitmap map-3DColors savebmp2 setimage: btnapply \ normal displayed image --- 368,377 ---- IDCANCEL SetID: btnClose ! ( TCS_BUTTONS ) TCS_FLATBUTTONS ( or ) AddStyle: TabProperties On_Init: Super self Start: btnApply ! 4 ( btnApplyX ) btnApplyY btnApplyW btnApplyH Move: btnApply savebmp2 usebitmap map-3DColors savebmp2 setimage: btnapply \ normal displayed image *************** *** 333,344 **** Handle: WinFont SetFont: btnApply ! self Start: btnClose ! btnCloseX btnCloseY btnCloseW btnCloseH Move: btnClose ! stopbmp2 usebitmap map-3DColors ! stopbmp2 setimage: btnclose \ normal displayed image ! stopbmp1 usebitmap map-3DColors \ image to display when hovering mouse ! stopbmp1 SetImage#2: btnClose ! s" Close" SetText: btnClose ! Handle: WinFont SetFont: btnClose --- 381,392 ---- Handle: WinFont SetFont: btnApply ! \ self Start: btnClose ! \ btnCloseX btnCloseY btnCloseW btnCloseH Move: btnClose ! \ stopbmp2 usebitmap map-3DColors ! \ stopbmp2 setimage: btnclose \ normal displayed image ! \ stopbmp1 usebitmap map-3DColors \ image to display when hovering mouse ! \ stopbmp1 SetImage#2: btnClose ! \ s" Close" SetText: btnClose ! \ Handle: WinFont SetFont: btnClose *************** *** 369,372 **** --- 417,422 ---- ClientSize: TabProperties 2over d- Move: frmAction + Clear: self + ;M *************** *** 376,418 **** ;M - :M ClassInit: ( -- ) - ClassInit: Super - self link-formwindow - ;M - - :M WindowStyle: ( -- style ) - WindowStyle: Super - WS_MINIMIZEBOX or \ allow moving out of the way - ;M - ;Object : UpdateProperties++ ( -- ) ! GetHandle: frmProperties++ 0= ?exit ! LoadProperties: frmEditForm \ and update ! ; : FormProperty ( -- ) \ edit form properties ActiveForm 0= ?exit ! GetHandle: MainWindow SetParentWindow: frmProperties++ ! Start: frmProperties++ ! 0 ShowTab: frmProperties++ \ show the form tab UpdateProperties++ ! SetFocus: ActiveForm ; IDM_FORM_FORMPROPERTY SetCommand : ControlProperty ( -- ) \ edit control properties ActiveForm 0= ?exit ! GetHandle: MainWindow SetParentWindow: frmProperties++ ! Start: frmProperties++ ! 1 ShowTab: frmProperties++ \ show the control tab ! initload ! SetFocus: ActiveForm ; IDM_FORM_CONTROLPROPERTY SetCommand : GroupAction ( -- ) \ multiple action on controls ActiveForm 0= ?exit ! GetHandle: MainWindow SetParentWindow: frmProperties++ ! Start: frmProperties++ ! 2 ShowTab: frmProperties++ \ show the action tab ! ; IDM_FORM_GroupAction SetCommand \s --- 426,451 ---- ;M ;Object : UpdateProperties++ ( -- ) ! LoadProperties: frmEditForm \ and update for form ! initload ; \ and for controls as well : FormProperty ( -- ) \ edit form properties ActiveForm 0= ?exit ! 0 ShowTab: frmProperties++ \ show the form tab UpdateProperties++ ! SetFocus: ActiveForm ; IDM_FORM_FORMPROPERTY SetCommand : ControlProperty ( -- ) \ edit control properties ActiveForm 0= ?exit ! 1 ShowTab: frmProperties++ \ show the control tab ! UpdatePropertyWindow ! SetFocus: ActiveForm ; IDM_FORM_CONTROLPROPERTY SetCommand : GroupAction ( -- ) \ multiple action on controls ActiveForm 0= ?exit ! 2 ShowTab: frmProperties++ \ show the action tab ! ; IDM_FORM_GroupAction SetCommand \s Index: ScintillaMDI.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Win32ForthIDE/ScintillaMDI.f,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ScintillaMDI.f 27 Jul 2008 07:21:51 -0000 1.10 --- ScintillaMDI.f 10 Apr 2009 16:46:26 -0000 1.11 *************** *** 183,186 **** --- 183,187 ---- FindText$ 1+ FindText: ChildWindow ( nStart nEnd flag ) if SetSel: ChildWindow + else 2drop \ Saturday, November 22 2008 added by EAB then else drop *************** *** 413,421 **** : SaveText ( -- ) \ save the Text in the control to the file ! StripTrailingSpaces? dup . space if StripTrailingSpaces: self then ! EnsureFinalNewLine? dup . space if EnsureFinalNewLine: self then --- 414,422 ---- : SaveText ( -- ) \ save the Text in the control to the file ! StripTrailingSpaces? ( dup . space ) if StripTrailingSpaces: self then ! EnsureFinalNewLine? ( dup . space ) if EnsureFinalNewLine: self then |