From 21bd64cec285f527d8f2b719f70ba96356d065a2 Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Thu, 14 Jan 2010 18:10:11 +0000 Subject: [PATCH] 2010-01-14 10:08 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/hbide.prg * contrib/hbide/idedocks.prg * contrib/hbide/ideeditor.prg * contrib/hbide/ideprojmanager.prg * contrib/hbide/idesources.prg ! Updated to latest Harbour standards : Method Definition == Method Declaration. --- harbour/ChangeLog | 9 +++ harbour/contrib/hbide/hbide.prg | 72 ++++++++--------- harbour/contrib/hbide/idedocks.prg | 12 +-- harbour/contrib/hbide/ideeditor.prg | 89 ++++++++++----------- harbour/contrib/hbide/ideprojmanager.prg | 98 ++++++++++++------------ harbour/contrib/hbide/idesources.prg | 19 +++-- 6 files changed, 141 insertions(+), 158 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9f9c1f49fb..a29fb651c2 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,15 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-01-14 10:08 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbide/hbide.prg + * contrib/hbide/idedocks.prg + * contrib/hbide/ideeditor.prg + * contrib/hbide/ideprojmanager.prg + * contrib/hbide/idesources.prg + ! Updated to latest Harbour standards : + Method Definition == Method Declaration. + 2010-01-14 10:03 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbxbp/xbp3state.prg * contrib/hbxbp/xbpbitmap.prg diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index 231abda9c0..3c380c4c8b 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -119,29 +119,32 @@ CLASS HbIde DATA oEM /* Editor Tabs Manager */ DATA oSM /* Souces Manager */ DATA oFR /* Find Replace Manager */ + DATA oThemes DATA aMeta INIT {} /* Holds current definition only */ DATA mp1, mp2, oXbp, nEvent - DATA aTabs INIT {} DATA cProjIni - DATA oCurTab INIT NIL - DATA nCurTab INIT 0 - DATA aIni INIT {} + DATA aTabs INIT {} + DATA aINI INIT {} + DATA aProjData INIT {} + DATA aPrpObjs INIT {} + DATA aEditorPath INIT {} /* HBQT Objects */ DATA qLayout DATA qTabWidget DATA qFindDlg - ACCESS oCurEditor INLINE ::oEM:getEditorCurrent() - ACCESS qCurEdit INLINE ::oEM:getEditCurrent() - ACCESS qCurDocument INLINE ::oEM:getDocumentCurrent() - DATA qCursor DATA qFontWrkProject DATA qBrushWrkProject + DATA qProcess + + ACCESS oCurEditor INLINE ::oEM:getEditorCurrent() + ACCESS qCurEdit INLINE ::oEM:getEditCurrent() + ACCESS qCurDocument INLINE ::oEM:getDocumentCurrent() /* XBP Objects */ DATA oDlg @@ -165,17 +168,13 @@ CLASS HbIde DATA oNewDlg DATA oTabWidget DATA oPBFind, oPBRepl, oPBClose, oFind, oRepl - DATA oCurProjItem DATA oCurProject - DATA oProjRoot DATA oExes DATA oLibs DATA oDlls - DATA aProjData INIT {} - DATA aPrpObjs INIT {} - DATA aEditorPath INIT {} + DATA oProps DATA lProjTreeVisible INIT .t. DATA lDockRVisible INIT .f. @@ -184,9 +183,12 @@ CLASS HbIde DATA cSaveTo INIT "" DATA oOpenedSources - DATA resPath INIT hb_DirBase() + "resources" + hb_OsPathSeparator() DATA pathSep INIT hb_OsPathSeparator() + DATA cWrkProject INIT '' + DATA cWrkTheme INIT '' + DATA cProcessInfo + DATA cIniThemes DATA aTags INIT {} DATA aText INIT {} @@ -195,36 +197,26 @@ CLASS HbIde DATA aLines INIT {} DATA aComments INIT {} DATA aProjects INIT {} - DATA cWrkProject INIT '' - DATA cWrkTheme INIT '' - DATA oProps - DATA cProcessInfo - DATA qProcess - - DATA cIniThemes - DATA oThemes - - METHOD new( cProjectOrSource ) - METHOD create( cProjectOrSource ) + METHOD new( cProjIni ) + METHOD create( cProjIni ) METHOD destroy() - - METHOD setPosAndSizeByIni() - METHOD setPosByIni() - METHOD setSizeByIni() - METHOD execAction() - METHOD manageFuncContext() - METHOD manageProjectContext() - METHOD updateFuncList() - METHOD gotoFunction() - METHOD updateProjectMenu() - METHOD updateProjectTree() - METHOD manageItemSelected() - METHOD createTags() + METHOD execAction( cKey ) + METHOD setPosAndSizeByIni( qWidget, nPart ) + METHOD setPosByIni( qWidget, nPart ) + METHOD setSizeByIni( qWidget, nPart ) METHOD manageFocusInEditor() - METHOD loadUI() - METHOD setCodec() + METHOD updateProjectTree( aPrj, lRemove ) + METHOD manageItemSelected( oXbpTreeItem ) + METHOD manageProjectContext( mp1, mp2, oXbpTreeItem ) + METHOD updateFuncList() + METHOD gotoFunction( mp1, mp2, oListBox ) + METHOD manageFuncContext( mp1 ) + METHOD createTags() + METHOD loadUI( cUi ) + METHOD updateProjectMenu() METHOD updateTitleBar() + METHOD setCodec( cCodec ) ENDCLASS diff --git a/harbour/contrib/hbide/idedocks.prg b/harbour/contrib/hbide/idedocks.prg index a8a561e48e..718587c64d 100644 --- a/harbour/contrib/hbide/idedocks.prg +++ b/harbour/contrib/hbide/idedocks.prg @@ -76,23 +76,19 @@ CLASS IdeDockS INHERIT IdeObject DATA nPass INIT 0 - METHOD new() - METHOD create() + METHOD new( oIde ) + METHOD create( oIde ) METHOD destroy() - METHOD buildDialog() - METHOD buildStatusBar() - METHOD buildDockWidgets() - METHOD buildProjectTree() METHOD buildEditorTree() METHOD buildFuncList() METHOD buildCompileResults() METHOD buildLinkResults() METHOD buildOutputResults() - - METHOD outputDoubleClicked() + METHOD outputDoubleClicked( lSelected ) + METHOD buildStatusBar() METHOD toggleLeftDocks() METHOD toggleRightDocks() METHOD toggleBottomDocks() diff --git a/harbour/contrib/hbide/ideeditor.prg b/harbour/contrib/hbide/ideeditor.prg index a440324828..08eb789548 100644 --- a/harbour/contrib/hbide/ideeditor.prg +++ b/harbour/contrib/hbide/ideeditor.prg @@ -93,10 +93,26 @@ CLASS IdeEditsManager INHERIT IdeObject DATA qContextMenu DATA aActions INIT {} - METHOD new() - METHOD create() - - METHOD goto() + METHOD new( oIde ) + METHOD create( oIde ) + METHOD prepareTabWidget() + METHOD removeSourceInTree( cSourceFile ) + METHOD addSourceInTree( cSourceFile ) + METHOD exeBlock( nMode, p ) + METHOD buildEditor( cSourceFile, nPos, nHPos, nVPos, cTheme ) + METHOD getTabBySource( cSource ) + METHOD getTabCurrent() + METHOD getDocumentCurrent() + METHOD getEditCurrent() + METHOD getEditorCurrent() + METHOD getEditorByIndex( nIndex ) + METHOD getEditorByTabObject( oTab ) + METHOD getEditorByTabPosition( nPos ) + METHOD getEditorBySource( cSource ) + METHOD reLoad( cSource ) + METHOD isOpen( cSource ) + METHOD setSourceVisible( cSource ) + METHOD setSourceVisibleByIndex( nIndex ) METHOD undo() METHOD redo() METHOD cut() @@ -104,39 +120,12 @@ CLASS IdeEditsManager INHERIT IdeObject METHOD paste() METHOD selectAll() METHOD switchToReadOnly() - METHOD insertText() - + METHOD convertSelection( cKey ) + METHOD insertText( cKey ) + METHOD zoom( cKey ) METHOD printPreview() - METHOD paintRequested() - - METHOD convertSelection() - - METHOD zoom() - - METHOD isOpen() - METHOD reLoad() - METHOD buildEditor() - - METHOD setSourceVisible() - METHOD setSourceVisibleByIndex() - - METHOD getDocumentCurrent() - - METHOD getTabCurrent() - METHOD getTabBySource() - - METHOD getEditCurrent() - - METHOD getEditorCurrent() - METHOD getEditorBySource() - METHOD getEditorByTabPosition() - METHOD getEditorByTabObject() - METHOD getEditorByIndex() - - METHOD prepareTabWidget() - METHOD exeBlock() - METHOD addSourceInTree() - METHOD removeSourceInTree() + METHOD paintRequested( pPrinter ) + METHOD goto() ENDCLASS @@ -693,17 +682,17 @@ CLASS IdeEditor INHERIT IdeObject DATA nnRow INIT -99 DATA qPoint INIT QPoint():new() - METHOD new() - METHOD create() - METHOD destroy() - METHOD buildTabPage() - METHOD activateTab() - METHOD dispEditInfo() - METHOD setTabImage() - METHOD applyTheme() + METHOD new( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme ) + METHOD create( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme ) + METHOD split( nOrient, oEditP ) + METHOD destroy() METHOD setDocumentProperties() - METHOD split() + METHOD activateTab( mp1, mp2, oXbp ) + METHOD buildTabPage( cSource ) + METHOD dispEditInfo( qEdit ) + METHOD setTabImage( qEdit ) + METHOD applyTheme( cTheme ) ENDCLASS @@ -1005,12 +994,12 @@ CLASS IdeEdit INHERIT IdeObject DATA qPoint INIT QPoint():new( 0,0 ) - METHOD new() - METHOD create() + METHOD new( oEditor, nMode ) + METHOD create( oEditor, nMode ) METHOD destroy() - METHOD exeBlock() - METHOD connectEditSlots() - METHOD disConnectEditSlots() + METHOD exeBlock( nMode, oEdit, o, p, p1 ) + METHOD connectEditSlots( oEdit ) + METHOD disConnectEditSlots( oEdit ) ENDCLASS diff --git a/harbour/contrib/hbide/ideprojmanager.prg b/harbour/contrib/hbide/ideprojmanager.prg index 44a8a1abfb..127ebf5088 100644 --- a/harbour/contrib/hbide/ideprojmanager.prg +++ b/harbour/contrib/hbide/ideprojmanager.prg @@ -105,7 +105,7 @@ CLASS IdeProject DATA dotHbp INIT "" DATA compilers INIT "" - METHOD new() + METHOD new( aProps ) METHOD applyMeta( s ) METHOD expandMeta( s ) @@ -113,36 +113,6 @@ CLASS IdeProject /*----------------------------------------------------------------------*/ -METHOD IdeProject:expandMeta( s ) - LOCAL k - LOCAL a_:= ::metaData - - IF ! Empty( a_ ) - FOR EACH k IN a_ DESCEND - s := StrTran( hbide_pathNormalized( s, .f. ), k[ 1 ], k[ 2 ] ) - NEXT - ENDIF - - RETURN s - -/*----------------------------------------------------------------------*/ - -METHOD IdeProject:applyMeta( s ) - LOCAL k - LOCAL a_:= ::metaData - //LOCAL ss := s - - IF ! Empty( a_ ) - FOR EACH k IN a_ - s := StrTran( hbide_pathNormalized( s, .f. ), k[ 2 ], k[ 1 ] ) - NEXT - ENDIF - - //MsgBox( ss + " => " + s ) - RETURN s - -/*----------------------------------------------------------------------*/ - METHOD IdeProject:new( aProps ) LOCAL b_, a_ @@ -178,6 +148,34 @@ METHOD IdeProject:new( aProps ) RETURN Self +/*----------------------------------------------------------------------*/ + +METHOD IdeProject:applyMeta( s ) + LOCAL k + LOCAL a_:= ::metaData + + IF ! Empty( a_ ) + FOR EACH k IN a_ + s := StrTran( hbide_pathNormalized( s, .f. ), k[ 2 ], k[ 1 ] ) + NEXT + ENDIF + + RETURN s + +/*----------------------------------------------------------------------*/ + +METHOD IdeProject:expandMeta( s ) + LOCAL k + LOCAL a_:= ::metaData + + IF ! Empty( a_ ) + FOR EACH k IN a_ DESCEND + s := StrTran( hbide_pathNormalized( s, .f. ), k[ 1 ], k[ 2 ] ) + NEXT + ENDIF + + RETURN s + /*----------------------------------------------------------------------*/ // IdeProjectManager /*----------------------------------------------------------------------*/ @@ -196,30 +194,30 @@ CLASS IdeProjManager INHERIT IdeObject DATA lPPO INIT .f. DATA oProject - METHOD new() - METHOD create() + METHOD new( oIde ) + METHOD create( oIde ) METHOD destroy() METHOD populate() - METHOD loadProperties() + METHOD loadProperties( cProjFileName, lNew, lFetch, lUpdateTree ) METHOD fetchProperties() - METHOD save() - METHOD updateHbp() - METHOD addSources() - METHOD getCurrentProject() - METHOD setCurrentProject() - METHOD selectCurrentProject() - METHOD closeProject() - METHOD promptForPath() - METHOD launchProject() - METHOD buildProject() - METHOD readProcessInfo() - METHOD getProjectProperties() - METHOD getProjectByTitle() - METHOD getProjectByFile() - METHOD buildProcess() + METHOD sortSources( cMode ) METHOD updateMetaData() - METHOD sortSources() + METHOD save( lCanClose ) + METHOD updateHbp( iIndex ) + METHOD addSources() + METHOD setCurrentProject( cProjectName ) + METHOD getCurrentProject( lAlert ) + METHOD selectCurrentProject() + METHOD getProjectProperties( cProjectTitle ) + METHOD getProjectByFile( cProjectFile ) + METHOD getProjectByTitle( cProjectTitle ) + METHOD closeProject( cProject ) + METHOD promptForPath( cObjPathName, cTitle, cObjFileName, cObjPath2, cObjPath3 ) + METHOD buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt ) + METHOD buildProcess() + METHOD readProcessInfo( nMode, i, ii ) + METHOD launchProject( cProject ) ENDCLASS diff --git a/harbour/contrib/hbide/idesources.prg b/harbour/contrib/hbide/idesources.prg index cf6e171122..9227246aa6 100644 --- a/harbour/contrib/hbide/idesources.prg +++ b/harbour/contrib/hbide/idesources.prg @@ -73,20 +73,19 @@ CLASS IdeSourcesManager INHERIT IdeObject - METHOD new() - METHOD create() - + METHOD new( oIde ) + METHOD create( oIde ) METHOD loadSources() - METHOD openSource() - METHOD editSource() - METHOD selectSource() - METHOD closeSource() + METHOD saveSource( nTab, lCancel, lAs ) + METHOD editSource( cSourceFile, nPos, nHPos, nVPos, cTheme, lAlert, lVisible ) + METHOD closeSource( nTab, lCanCancel, lCanceled ) METHOD closeAllSources() - METHOD closeAllOthers() - METHOD saveSource() + METHOD closeAllOthers( nTab ) METHOD saveAllSources() METHOD saveAndExit() - METHOD revertSource() + METHOD revertSource( nTab ) + METHOD openSource() + METHOD selectSource( cMode, cFile, cTitle ) ENDCLASS