2009-12-30 10:40 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* contrib/hbide/hbide.prg
  * contrib/hbide/ideactions.prg
  * contrib/hbide/idedocks.prg
  * contrib/hbide/idemisc.prg
  * contrib/hbide/idestylesheets.prg
    + Applied the patch submitted by Vailton Renato with some omissions, thanks.
      1. I do like xMate's build* icons and "gotoline" icon
         which depics the meaning of action properly, just update them to
         have more colors.
      2. Toolbar must not be clutted with so many options.
         For this purpose we have menus.

  * contrib/hbide/resources/*.png
    ! Some new and some refined imaged from Vailton.
This commit is contained in:
Pritpal Bedi
2009-12-30 18:56:38 +00:00
parent a1c89f7f3b
commit c2af02cecc
55 changed files with 613 additions and 307 deletions

View File

@@ -17,6 +17,22 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-12-30 10:40 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbide/hbide.prg
* contrib/hbide/ideactions.prg
* contrib/hbide/idedocks.prg
* contrib/hbide/idemisc.prg
* contrib/hbide/idestylesheets.prg
+ Applied the patch submitted by Vailton Renato with some omissions, thanks.
1. I do like xMate's build* icons and "gotoline" icon
which depics the meaning of action properly, just update them to
have more colors.
2. Toolbar must not be clutted with so many options.
For this purpose we have menus.
* contrib/hbide/resources/*.png
! Some new and some refined imaged from Vailton.
2009-12-30 10:35 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbxbp/xbpmenubar.prg
! Removed default style-sheet application which has to be

View File

@@ -401,14 +401,6 @@ METHOD HbIde:executeAction( cKey )
DO CASE
CASE cKey == "Exit"
PostAppEvent( xbeP_Close, NIL, NIL, ::oDlg )
CASE cKey == "ToggleProjectTree"
::lProjTreeVisible := !::lProjTreeVisible
IF !( ::lProjTreeVisible )
::oProjTree:hide()
ELSE
::oProjTree:show()
ENDIF
CASE cKey == "NewProject"
::loadProjectProperties( , .t., .t., .t. )
CASE cKey == "LoadProject"
@@ -510,7 +502,17 @@ METHOD HbIde:executeAction( cKey )
IF !empty( ::qCurEdit )
//::qCurEdit:zoomOut()
ENDIF
CASE cKey == "11"
CASE cKey == "ToggleProjectTree"
::lProjTreeVisible := !::lProjTreeVisible
IF !( ::lProjTreeVisible )
::oDockPT:hide()
::oDockED:hide()
ELSE
::oDockPT:show()
::oDockED:show()
ENDIF
CASE cKey == "ToggleBuildInfo"
IF ::lDockBVisible
::oDockB:hide()
::oDockB1:hide()
@@ -522,7 +524,7 @@ METHOD HbIde:executeAction( cKey )
::oDockB2:show()
::lDockBVisible := .t.
ENDIF
CASE cKey == "12"
CASE cKey == "ToggleFuncList"
IF ::lDockRVisible
::oDockR:hide()
ELSE
@@ -639,6 +641,11 @@ METHOD HbIde:editSource( cSourceFile, nPos, nHPos, nVPos, lPPO )
RETURN Self
ENDIF
IF !Empty( cSourceFile ) .AND. !File( cSourceFile )
MsgBox( 'File not found: ' + cSourceFile )
RETURN Self
ENDIF
DEFAULT cSourceFile TO ::cProjIni
DEFAULT nPos TO 0
DEFAULT nHPos TO 0
@@ -1553,6 +1560,7 @@ METHOD HbIde:setCurrentProject( cProjectName )
METHOD HbIde:getCurrentProject()
LOCAL oDlg
LOCAL i, p, t
IF !Empty( ::cWrkProject )
RETURN ::cWrkProject
@@ -1571,7 +1579,15 @@ METHOD HbIde:getCurrentProject()
oDlg:file := s_resPath + "selectproject.ui"
oDlg:create()
aEval( ::aProjects, {|e_| oDlg:qObj[ "cbProjects" ]:addItem( e_[ 3, PRJ_PRP_PROPERTIES, 2, E_oPrjTtl ] ) } )
* Fill ComboBox with current project names
FOR i := 1 TO Len( ::aProjects )
p := ::aProjects[i]
t := p[ 3, PRJ_PRP_PROPERTIES, 2, E_oPrjTtl ]
IF !Empty( t )
oDlg:qObj[ "cbProjects" ]:addItem( t )
End
End
oDlg:signal( "btnOk" , "clicked()", {|| ::setCurrentProject( oDlg:qObj[ "cbProjects" ]:currentText() ), oDlg:oWidget:close() } )
oDlg:signal( "btnCancel" , "clicked()", {|| oDlg:oWidget:close() } )
@@ -1587,8 +1603,8 @@ METHOD HbIde:getCurrentProject()
/*----------------------------------------------------------------------*/
/* hb_processRun( <cCommand>, [ <cStdIn> ], [ @<cStdOut> ], [ @<cStdErr> ], [ <lDetach> ] ) -> <nResult> */
METHOD HbIde:buildProject( cProject, lLaunch, lRebuild, lPPO )
LOCAL cCmd, cOutput, cErrors, n, aPrj, cHbpPath, aHbp
METHOD HbIde:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt )
LOCAL cCmd, cOutput, cErrors, n, aPrj, cHbpPath, aHbp, qStringList
LOCAL cTmp, nResult
LOCAL nseconds
LOCAL cTargetFN
@@ -1600,7 +1616,9 @@ METHOD HbIde:buildProject( cProject, lLaunch, lRebuild, lPPO )
DEFAULT lLaunch TO .F.
DEFAULT lRebuild TO .F.
DEFAULT lPPO TO .F.
DEFAULT lDelHbp TO lPPO
DEFAULT lViaQt TO .f.
lDelHbp := lPPO
IF lPPO .AND. ::getCurrentTab() == 0
MsgBox( 'No file open issue to be compiled!' )
@@ -1658,8 +1676,9 @@ METHOD HbIde:buildProject( cProject, lLaunch, lRebuild, lPPO )
aeval( aPrj[ PRJ_PRP_FLAGS, 2 ], {|e| aadd( aHbp, e ) } )
IF !lPPO
IF !( lPPO )
aeval( FilesToSources( aPrj[ PRJ_PRP_SOURCES, 2 ] ), {|e| aadd( aHbp, e ) } )
ELSE
aadd( aHbp, "-hbcmp -s -p" )
@@ -1670,7 +1689,7 @@ METHOD HbIde:buildProject( cProject, lLaunch, lRebuild, lPPO )
IF !( lower( cTmp ) $ ".prg,?" )
MsgBox( 'Operation not supported for this file type: "'+cTmp+'"' )
RETURN Self
End
ENDIF
cFileName := cPath + cFileName + '.ppo'
@@ -1679,10 +1698,11 @@ METHOD HbIde:buildProject( cProject, lLaunch, lRebuild, lPPO )
aadd( aHbp, ::aTabs[ n, 5 ] )
FErase( cFileName )
End
ENDIF
IF !CreateTarget( cHbpPath, aHbp )
cTmp := 'Error saving: ' + cHbpPath
ELSE
::lDockBVisible := .t.
::oDockB2:show()
@@ -1695,54 +1715,84 @@ METHOD HbIde:buildProject( cProject, lLaunch, lRebuild, lPPO )
'-----------------------------------------------------------------' + CRLF
cCmd := "hbmk2.exe " + cHbpPath
nseconds := seconds() // time elapsed
nResult := hb_processRun( cCmd, , @cOutput, @cErrors )
nSeconds := seconds() // time elapsed
* Show detailed status about compile process...
cTmp += cOutput + CRLF
cTmp += IF( empty( cErrors ), "", cErrors ) + CRLF
cTmp += "errorlevel: " + hb_ntos( nResult ) + CRLF
cTmp += '-----------------------------------------------------------------' + CRLF
cTmp += 'Finished at ' + time() + CRLF
cTmp += "Done in " + ltrim( str( seconds() - nseconds ) ) +" seconds." + CRLF
IF lViaQt
::lDockBVisible := .t.
::oDockB2:show()
IF (nResult == 0) .AND. (lLaunch)
cTmp += CRLF
::cProcessInfo := ""
IF !File( cTargetFN )
cTmp += "Launch application error: file not found " + cTargetFN + "!"
qStringList := QStringList():new()
qStringList:append( cHbpPath )
ELSEIF aPrj[ PRJ_PRP_PROPERTIES, 2, E_qPrjType ] == "Executable"
cTmp += "Launch application " + cTargetFN + "... "
::qProcess := QProcess():new()
::qProcess:setProcessChannelMode( 0 )
::qProcess:setReadChannel( 0 )
//::qProcess:setStandardOutputFile( "c:\temp\out.out" )
//::qProcess:setStandardErrorFile( "c:\temp\err.out" )
qProcess := QProcess():new()
qProcess:startDetached_2( cTargetFN )
qProcess:waitForStarted()
qProcess:pPtr := 0
qProcess := NIL
Qt_Connect_Signal( ::qProcess, "readyReadStandardOutput()", {|o,i| ::readProcessInfo( 2, i, o ) } )
Qt_Connect_Signal( ::qProcess, "readyReadStandardError()" , {|o,i| ::readProcessInfo( 3, i, o ) } )
Qt_Connect_Signal( ::qProcess, "finished(int,int)" , {|o,i| ::readProcessInfo( 4, i, o ) } )
ELSE
cTmp += "Launch application " + cTargetFN + "... (not applicable)" + CRLF
End
End
End
::oOutputResult:oWidget:clear()
::qProcess:start( "hbmk2.exe", qStringList )
//::oOutputResult:oWidget:setHtml( ConvertBuildStatusMsgToHtml( cTmp ) )
ConvertBuildStatusMsgToHtml( cTmp, ::oOutputResult:oWidget )
ELSE
nResult := hb_processRun( cCmd, , @cOutput, @cErrors )
* Show detailed status about compile process...
cTmp += cOutput + CRLF
cTmp += IF( empty( cErrors ), "", cErrors ) + CRLF
cTmp += "errorlevel: " + hb_ntos( nResult ) + CRLF
cTmp += '-----------------------------------------------------------------' + CRLF
cTmp += 'Finished at ' + time() + CRLF
cTmp += "Done in " + ltrim( str( seconds() - nseconds ) ) +" seconds." + CRLF
IF ( nResult == 0 ) .AND. ( lLaunch )
cTmp += CRLF
IF !File( cTargetFN )
cTmp += "Launch application error: file not found " + cTargetFN + "!"
ELSEIF aPrj[ PRJ_PRP_PROPERTIES, 2, E_qPrjType ] == "Executable"
cTmp += "Launch application " + cTargetFN + "... "
qProcess := QProcess():new()
qProcess:startDetached_2( cTargetFN )
qProcess:waitForStarted()
qProcess:pPtr := 0
qProcess := NIL
ELSE
cTmp += "Launch application " + cTargetFN + "... (not applicable)" + CRLF
ENDIF
ENDIF
ENDIF
//::oOutputResult:oWidget:setHtml( ConvertBuildStatusMsgToHtml( cTmp ) )
ConvertBuildStatusMsgToHtml( cTmp, ::oOutputResult:oWidget )
ENDIF
IF lDelHbp
FErase( cHbpPath )
End
ENDIF
IF lPPO .AND. File( cFileName )
::editSource( cFileName, nil, nil, nil, .T. )
End
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD HbIde:buildProjectViaQt( cProject )
::buildProject( cProject, , , , .t. )
#if 0
LOCAL n, aPrj, cHbpPath, aHbp, qStringList
n := ascan( ::aProjects, {|e_, x| x := e_[ 3 ], x[ 1,2,PRJ_PRP_TITLE ] == cProject } )
@@ -1764,14 +1814,15 @@ METHOD HbIde:buildProjectViaQt( cProject )
qStringList:append( cHbpPath )
::qProcess := QProcess():new()
::qProcess:setReadChannel( 0 )
::qProcess:setReadChannel( 1 )
Qt_Connect_Signal( ::qProcess, "readyReadStandardOutput()", {|o,i| ::readProcessInfo( 2, i, o ) } )
Qt_Connect_Signal( ::qProcess, "readyReadStandardError()" , {|o,i| ::readProcessInfo( 3, i, o ) } )
Qt_Connect_Signal( ::qProcess, "finished(int,int)" , {|o,i| ::readProcessInfo( 4, i, o ) } )
::oOutputResult:oWidget:clear()
::qProcess:start( "hbmk2.exe", qStringList )
#endif
RETURN Self
/*----------------------------------------------------------------------*/
@@ -1787,10 +1838,12 @@ METHOD HbIde:readProcessInfo( nMode, iBytes )
CASE nMode == 2
::qProcess:setReadChannel( 0 ) // QProcess_StandardOutput )
cLine := space( 1024 )
::qProcess:readLine( @cLine, 1024 )
//::qProcess:readLine( @cLine, 1024 )
cLine := QByteArray():configure( ::qProcess:readAllStandardOutput() ):constData()
IF !empty( cLine )
::cProcessInfo += CRLF + trim( cLine )
::oOutputResult:oWidget:appendPlainText( cLine )
//::oOutputResult:oWidget:append( '<font color=blue>' + cLine + '</font>' )
::oOutputResult:oWidget:append( cLine )
ENDIF
CASE nMode == 3
@@ -1799,10 +1852,19 @@ METHOD HbIde:readProcessInfo( nMode, iBytes )
::qProcess:readLine( @cLine, 1024 )
IF !empty( cLine )
::cProcessInfo += CRLF + trim( cLine )
::oOutputResult:oWidget:appendPlainText( cLine )
IF ( "Warning" $ cLine )
cLine := '<font color=blue>' + cLine + '</font>'
ELSEIF ( "Error" $ cLine )
cLine := '<font color=red>' + cLine + '</font>'
ENDIF
//::oOutputResult:oWidget:appendPlainText( cLine )
::oOutputResult:oWidget:append( cLine )
ENDIF
CASE nMode == 4
::oOutputResult:oWidget:append( '-----------------------------------------------------------------' )
::oOutputResult:oWidget:append( 'Finished at ' + time() )
Qt_DisConnect_Signal( ::qProcess, "finished(int,int)" )
Qt_DisConnect_Signal( ::qProcess, "readyReadStandardOutput()" )
Qt_DisConnect_Signal( ::qProcess, "readyReadStandardError()" )

View File

@@ -75,57 +75,69 @@ FUNCTION buildToolBar( oWnd, oIde )
LOCAL cResPath := hb_DirBase() + "resources" + hb_OsPathSeparator()
oTBar := XbpToolBar():new( oWnd )
oTBar:imageWidth := 22
oTBar:imageHeight := 22
oTBar:create( , , { 0, oWnd:currentSize()[ 2 ]-60 }, { oWnd:currentSize()[ 1 ], 60 } )
* oTBar:setStyleSheet( GetStyleSheet( "QToolBar" ) )
oTBar:imageWidth := 20
oTBar:imageHeight := 20
oTBar:oWidget:setMaximumHeight( 28 )
oTBar:oWidget:setMaximumHeight( 30 )
oTBar:addItem( "Exit" , cResPath + "exit.png" , , , , , "Exit" )
oTBar:addItem( "Exit" , cResPath + "exit.png" , , , , , "Exit" )
oTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
oTBar:addItem( "Toggle Project Tree" , cResPath + "properties.png" , , , , , "ToggleProjectTree" )
oTBar:addItem( "New" , cResPath + "new.png" , , , , , "New" )
oTBar:addItem( "Open" , cResPath + "open.png" , , , , , "Open" )
oTBar:addItem( "Save" , cResPath + "save.png" , , , , , "Save" )
oTBar:addItem( "Close" , cResPath + "close.png" , , , , , "Close" )
* oTBar:addItem( "Close all" , cResPath + "close.png" , , , , , "Close all" )
oTBar:addItem( "Print" , cResPath + "print.png" , , , , , "Print" )
oTBar:addItem( "New" , cResPath + "new.png" , , , , , "New" )
oTBar:addItem( "Open" , cResPath + "open.png" , , , , , "Open" )
oTBar:addItem( "Save" , cResPath + "save.png" , , , , , "Save" )
* oTBar:addItem( "Save As" , cResPath + "saveas.png" , , , , , "SaveAs" )
* oTBar:addItem( "Save All" , cResPath + "saveall.png" , , , , , "SaveAll" )
oTBar:addItem( "Close" , cResPath + "close.png" , , , , , "Close" )
* oTBar:addItem( "Close all" , cResPath + "closeall.png" , , , , , "CloseAll" )
oTBar:addItem( "Print" , cResPath + "print.png" , , , , , "Print" )
oTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
oTBar:addItem( "Compile" , cResPath + "compile.png" , , , , , "Compile" )
oTBar:addItem( "Compile to PPO" , cResPath + "ppo.png" , , , , , "CompilePPO" )
oTBar:addItem( "Build Project" , cResPath + "build.png" , , , , , "SaveBuild" )
oTBar:addItem( "Build and Launch Project" , cResPath + "buildlaunch.png" , , , , , "SaveBuildLaunch" )
oTBar:addItem( "Rebuild Project" , cResPath + "rebuild.png" , , , , , "SaveRebuild" )
oTBar:addItem( "Compile" , cResPath + "compile.png" , , , , , "Compile" )
oTBar:addItem( "Compile to PPO" , cResPath + "ppo.png" , , , , , "CompilePPO" )
#if 0
* oTBar:addItem( "Build Project" , cResPath + "build.png" , , , , , "SaveBuild" )
oTBar:addItem( "Build and Run" , cResPath + "run.png" , , , , , "SaveBuildLaunch" )
oTBar:addItem( "Build and Run without Debug", cResPath + "runnodebug.png" , , , , , "SaveBuildLaunch" )
oTBar:addItem( "Rebuild Project" , cResPath + "clean.png" , , , , , "SaveRebuild" )
oTBar:addItem( "Rebuild and Launch Project" , cResPath + "cleanrun.png" , , , , , "SaveRebuildLaunch" )
#else
oTBar:addItem( "Build Project" , cResPath + "build.png" , , , , , "SaveBuild" )
oTBar:addItem( "Build and Run Project" , cResPath + "buildlaunch.png" , , , , , "SaveBuildLaunch" )
oTBar:addItem( "Rebuild Project" , cResPath + "rebuild.png" , , , , , "SaveRebuild" )
oTBar:addItem( "Rebuild and Launch Project" , cResPath + "rebuildlaunch.png" , , , , , "SaveRebuildLaunch" )
oTBar:addItem( "Show/Hide Build Error Info" , cResPath + "builderror.png" , , , , , "11" )
oTBar:addItem( "Module Function List" , cResPath + "modulelist.png" , , , , , "12" )
#endif
//
oTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
oTBar:addItem( "Undo" , cResPath + "undo.png" , , , , , "Undo" )
oTBar:addItem( "Redo" , cResPath + "redo.png" , , , , , "Redo" )
oTBar:addItem( "Show/hide Project Tree" , cResPath + "properties.png" , , , , , "ToggleProjectTree" )
oTBar:addItem( "Show/hide Build Info" , cResPath + "builderror.png" , , , , , "ToggleBuildInfo" )
oTBar:addItem( "Show/hide Function List" , cResPath + "modulelist.png" , , , , , "ToggleFuncList" )
//
oTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
oTBar:addItem( "Cut" , cResPath + "cut.png" , , , , , "Cut" )
oTBar:addItem( "Copy" , cResPath + "copy.png" , , , , , "Copy" )
oTBar:addItem( "Paste" , cResPath + "paste.png" , , , , , "Paste" )
oTBar:addItem( "Select All" , cResPath + "selectall.png" , , , , , "SelectAll" )
oTBar:addItem( "Column/Stream Selection" , cResPath + "stream.png" , , , , , "19" )
oTBar:addItem( "Undo" , cResPath + "undo.png" , , , , , "Undo" )
oTBar:addItem( "Redo" , cResPath + "redo.png" , , , , , "Redo" )
oTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
oTBar:addItem( "Find" , cResPath + "find.png" , , , , , "Find" )
oTBar:addItem( "Search" , cResPath + "search.png" , , , , , "Search" )
oTBar:addItem( "Cut" , cResPath + "cut.png" , , , , , "Cut" )
oTBar:addItem( "Copy" , cResPath + "copy.png" , , , , , "Copy" )
oTBar:addItem( "Paste" , cResPath + "paste.png" , , , , , "Paste" )
oTBar:addItem( "Select All" , cResPath + "selectall.png" , , , , , "SelectAll" )
oTBar:addItem( "Column/Stream Selection" , cResPath + "stream.png" , , , , , "19" )
oTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
oTBar:addItem( "Place/Remove Mark" , cResPath + "placeremovemark.png", , , , , "SetMark" )
oTBar:addItem( "Goto Mark" , cResPath + "gotomark.png" , , , , , "GotoMark" )
oTBar:addItem( "Goto Line" , cResPath + "gotoline.png" , , , , , "Goto" )
oTBar:addItem( "Find" , cResPath + "find.png" , , , , , "Find" )
oTBar:addItem( "Search" , cResPath + "search.png" , , , , , "Search" )
oTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
oTBar:addItem( "To Upper" , cResPath + "toupper.png" , , , , , "ToUpper" )
oTBar:addItem( "To Lower" , cResPath + "tolower.png" , , , , , "ToLower" )
oTBar:addItem( "Invert Case" , cResPath + "invertcase.png" , , , , , "Invert" )
oTBar:addItem( "Match Pairs" , cResPath + "matchobj.png" , , , , , "28" )
oTBar:addItem( "Place/Remove Mark" , cResPath + "placeremovemark.png", , , , , "SetMark" )
oTBar:addItem( "Goto Mark" , cResPath + "gotomark.png" , , , , , "GotoMark" )
oTBar:addItem( "Goto Line" , cResPath + "gotoline.png" , , , , , "Goto" )
oTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
oTBar:addItem( "To Upper" , cResPath + "toupper.png" , , , , , "ToUpper" )
oTBar:addItem( "To Lower" , cResPath + "tolower.png" , , , , , "ToLower" )
oTBar:addItem( "Invert Case" , cResPath + "invertcase.png" , , , , , "Invert" )
oTBar:addItem( "Match Pairs" , cResPath + "matchobj.png" , , , , , "28" )
oTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
#if 0
oTBar:addItem( "ZoomIn" , cResPath + "zoomin.png" , , , , , "ZoomIn" )
oTBar:addItem( "ZoomOut" , cResPath + "zoomout.png" , , , , , "ZoomOut" )
oTBar:addItem( "ZoomIn" , cResPath + "zoomin.png" , , , , , "ZoomIn" )
oTBar:addItem( "ZoomOut" , cResPath + "zoomout.png" , , , , , "ZoomOut" )
oTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
#endif
@@ -135,25 +147,23 @@ FUNCTION buildToolBar( oWnd, oIde )
RETURN oTBar
/*----------------------------------------------------------------------*/
/*
* Normalizes a caption for an menu item with shortcut (or not).
* TODO: add support for translation of menu items AND support changing shortcuts
* loading from a text file for customing hotkeys AND icons. (vailtom)
* 27/12/2009 - 16:05:32 - vailtom
*/
STATIC;
FUNCTION mnuNormalizeItem( cCaption )
STATIC FUNCTION mnuNormalizeItem( cCaption )
LOCAL cKey
LOCAL cIco
LOCAL p
/* Retrieve and update the ICON name for this menu item */
IF ( (p := Rat( '|', cCaption )) != 00 )
IF ( (p := Rat( '|', cCaption ) ) != 00 )
cIco := Substr( cCaption, p+1 )
cIco := alltrim( cIco )
cCaption := Substr( cCaption, 1, p-1 )
cCaption := Substr( cCaption, 1, p - 1 )
cCaption := Alltrim( cCaption )
* cIco := s_resPath + Alltrim( cIco ) ---> "s_resPath" is need here!
@@ -172,9 +182,9 @@ FUNCTION mnuNormalizeItem( cCaption )
ENDIF
/* Update the key shortcut for this menu item */
IF ( (p := Rat( ',', cCaption )) != 00 )
IF ( ( p := Rat( ',', cCaption ) ) != 00 )
cKey := Substr( cCaption, p+1 )
cCaption := Substr( cCaption, 1, p-1 )
cCaption := Substr( cCaption, 1, p - 1 )
cCaption := alltrim( cCaption )
cKey := alltrim( cKey )
@@ -191,189 +201,214 @@ FUNCTION mnuNormalizeItem( cCaption )
cCaption := cIco + cCaption + cKey
RETURN cCaption
/* This pseudo function helps to create is a menu item with text and shortcut.*/
/*----------------------------------------------------------------------*/
/*
* This pseudo function helps to create is a menu item with text and shortcut.
*/
#define _T( x ) ( mnuNormalizeItem(x) )
/* This functions build the main menu for hbide.
*/
FUNCTION buildMainMenu( oWnd, oIde )
LOCAL oMenuBar, oSubMenu, oSub1
LOCAL oMenuBar, oSubMenu, oSub1, oSubMenu2
oMenuBar := oWnd:MenuBar()
oMenuBar:setStyleSheet( GetStyleSheet( "QMenuBar" ) )
oSubMenu := XbpMenu():new( oMenuBar ):create()
oSubMenu:title := "~File"
oSubMenu:addItem( { _T( "New, ^N | new.png" ) , {|| oIde:executeAction( "New" ) } } )
oSubMenu:addItem( { _T( "Open, ^O | open.png" ) , {|| oIde:executeAction( "Open" ) } } )
oSubMenu:addItem( { _T( "Recent Files*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Recent Projects*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "New, ^N | new.png" ) , {|| oIde:executeAction( "New" ) } } )
oSubMenu:addItem( { _T( "Open, ^O | open.png" ) , {|| oIde:executeAction( "Open" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Save, ^S | save.png" ) , {|| oIde:executeAction( "Save" ) } } )
oSubMenu:addItem( { _T( "Save As*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Save All*, Sh+^S" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Close, ^W | close.png" ) , {|| oIde:executeAction( "Close" ) } } )
oSubMenu:addItem( { _T( "Close All" ) , {|| oIde:executeAction( "CloseAll" ) } } )
oSubMenu:addItem( { _T( "Close Other*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Revert to Saved*, Sh+^R" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu2 := XbpMenu():new( oSubMenu ):create()
oSubMenu2:addItem( { _T( "Recent File 1*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu2:addItem( { _T( "Recent File 2*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu2:addItem( { _T( "Recent File 3*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu2:addItem( { _T( "Recent File 4*" ) , {|| oIde:executeAction( "" ) } } )
oMenuBar:addItem( { oSubMenu2, _T( "Recent Files*" ) } )
oSubMenu2 := XbpMenu():new( oSubMenu ):create()
oSubMenu2:addItem( { _T( "Recent Project 1*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu2:addItem( { _T( "Recent Project 2*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu2:addItem( { _T( "Recent Project 3*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu2:addItem( { _T( "Recent Project 4*" ) , {|| oIde:executeAction( "" ) } } )
oMenuBar:addItem( { oSubMenu2, _T( "Recent Projects*" ) } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Export as HTML*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Print*, ^P | print.png" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Save, ^S | save.png" ) , {|| oIde:executeAction( "Save" ) } } )
oSubMenu:addItem( { _T( "Save As* | saveas.png" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Save All*, Sh+^S | saveall.png") , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Close, ^W | close.png" ) , {|| oIde:executeAction( "Close" ) } } )
oSubMenu:addItem( { _T( "Close All | closeall.png" ) , {|| oIde:executeAction( "CloseAll" ) } } )
oSubMenu:addItem( { _T( "Close Other*| closeexcept.png" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Revert to Saved*, Sh+^R" ) , {|| oIde:executeAction( "" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Save and Exit*, Sh+^W" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Exit | exit.png" ) , {|| oIde:executeAction( "Exit" ) } } )
oSubMenu:addItem( { _T( "Export as HTML* | exporthtml.png" ), {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Print*, ^P | print.png" ) , {|| oIde:executeAction( "" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Save and Exit*, Sh+^W" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Exit | exit.png" ) , {|| oIde:executeAction( "Exit" ) } } )
oMenuBar:addItem( { oSubMenu, NIL } )
oSubMenu := XbpMenu():new( oMenuBar ):create()
oSubMenu:title := "~Edit"
oSubMenu:addItem( { _T( "Undo*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Redo*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Undo* | undo.png" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Redo* | redo.png" ) , {|| oIde:executeAction( "" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Cut*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Copy*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Paste*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Duplicate Line*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Select All*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Cut* | cut.png" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Copy* | copy.png" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Paste*| paste.png" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Duplicate Line*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Select All*" ) , {|| oIde:executeAction( "" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Find/Replace*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Go To Line...*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Find/Replace* | find.png" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Go To Line...*| gotoline.png" ) , {|| oIde:executeAction( "" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Insert*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Insert*" ) , {|| oIde:executeAction( "" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Set as Readonly*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Set as Readonly*" ) , {|| oIde:executeAction( "" ) } } )
oMenuBar:addItem( { oSubMenu, NIL } )
oSubMenu := XbpMenu():new( oMenuBar ):create()
oSubMenu:title := "~Project"
oSubMenu:addItem( { _T( "Add to Project...*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Remove from Project...*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Add to Project...*| projectadd.png" ), {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Remove from Project...* | projectdel.png" ), {|| oIde:executeAction( "" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "New" ) , {|| oIde:executeAction( "NewProject" ) } } )
oSubMenu:addItem( { _T( "Load" ) , {|| oIde:executeAction( "LoadProject" ) } } )
oSubMenu:addItem( { _T( "Close" ) , {|| oIde:executeAction( "CloseProject" ) } } )
oSubMenu:addItem( { _T( "New" ) , {|| oIde:executeAction( "NewProject" ) } } )
oSubMenu:addItem( { _T( "Load" ) , {|| oIde:executeAction( "LoadProject" ) } } )
oSubMenu:addItem( { _T( "Close" ) , {|| oIde:executeAction( "CloseProject" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Select Main Module...*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Select Main Module...* | setmain.png" ), {|| oIde:executeAction( "" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Project Properties" ) , {|| oIde:executeAction( "Properties" ) } } )
oSubMenu:addItem( { _T( "Project Properties" ) , {|| oIde:executeAction( "Properties" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Select Current Project*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Drop Current from Tree*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Select Current Project*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Drop Current from Tree*" ) , {|| oIde:executeAction( "" ) } } )
oMenuBar:addItem( { oSubMenu, NIL } )
oSubMenu := XbpMenu():new( oMenuBar ):create()
oSubMenu:title := "~Build"
oSubMenu:addItem( { _T( "Build,^F9" ) , {|| oIde:executeAction( "SaveBuild" ) } } )
oSubMenu:addItem( { _T( "Build and Launch, F9" ) , {|| oIde:executeAction( "SaveBuildLaunch" ) } } )
oSubMenu:addItem( { _T( "Re-build" ) , {|| oIde:executeAction( "SaveRebuild" ) } } )
oSubMenu:addItem( { _T( "Re-build and Launch, Sh+^F9" ) , {|| oIde:executeAction( "SaveRebuildLaunch" ) } } )
#if 0
oSubMenu:addItem( { _T( "Build,^F9" ) , {|| oIde:executeAction( "SaveBuild" ) } } )
oSubMenu:addItem( { _T( "Build and Run, F9 | run.png" ) , {|| oIde:executeAction( "SaveBuildLaunch" ) } } )
oSubMenu:addItem( { _T( "Re-build | clean.png" ) , {|| oIde:executeAction( "SaveRebuild" ) } } )
oSubMenu:addItem( { _T( "Re-build and Run, Sh+^F9 | cleanrun.png" ), {|| oIde:executeAction( "SaveRebuildLaunch" ) } } )
#else
oSubMenu:addItem( { _T( "Build, ^F9 | build.png" ) , {|| oIde:executeAction( "SaveBuild" ) } } )
oSubMenu:addItem( { _T( "Build and Launch, F9 | buildlaunch.png" ), {|| oIde:executeAction( "SaveBuildLaunch" ) } } )
oSubMenu:addItem( { _T( "Re-build | rebuild.png" ) , {|| oIde:executeAction( "SaveRebuild" ) } } )
oSubMenu:addItem( { _T( "Re-build and Launch, Sh+^F9 | rebuildlaunch.png" ), {|| oIde:executeAction( "SaveRebuildLaunch" ) } } )
#endif
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Save and Compile Current File") , {|| oIde:executeAction( "SaveCompileCurrent" ) } } )
oSubMenu:addItem( { _T( "Save and Compile to PPO" ) , {|| oIde:executeAction( "CompilePPO" ) } } )
oSubMenu:addItem( { _T( "Save and Compile Current File | compile.png"), {|| oIde:executeAction( "SaveCompileCurrent" ) } } )
oSubMenu:addItem( { _T( "Save and Compile to PPO | ppo.png" ), {|| oIde:executeAction( "CompilePPO" ) } } )
MenuAddSep( oSubMenu )
oSubMenu:addItem( { _T( "Run*, ^F10" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Run without Debug*, Sh+^F10" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Run*, ^F10" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Run without Debug*, Sh+^F10 | runnodebug.png" ), {|| oIde:executeAction( "" ) } } )
oMenuBar:addItem( { oSubMenu, NIL } )
oSubMenu := XbpMenu():new( oMenuBar ):create()
oSubMenu:title := "~CodePage"
oSubMenu:addItem( { "Apple Roman " , {|| oIde:setCodec( "Apple Roman" ) } } )
oSubMenu:addItem( { "Big5 " , {|| oIde:setCodec( "Big5" ) } } )
oSubMenu:addItem( { "Big5-HKSCS " , {|| oIde:setCodec( "Big5-HKSCS" ) } } )
oSubMenu:addItem( { "CP949 " , {|| oIde:setCodec( "CP949" ) } } )
oSubMenu:addItem( { "EUC-JP " , {|| oIde:setCodec( "EUC-JP" ) } } )
oSubMenu:addItem( { "EUC-KR " , {|| oIde:setCodec( "EUC-KR" ) } } )
oSubMenu:addItem( { "GB18030-0 " , {|| oIde:setCodec( "GB18030-0" ) } } )
oSubMenu:addItem( { "IBM 850 " , {|| oIde:setCodec( "IBM 850" ) } } )
oSubMenu:addItem( { "IBM 866 " , {|| oIde:setCodec( "IBM 866" ) } } )
oSubMenu:addItem( { "IBM 874 " , {|| oIde:setCodec( "IBM 874" ) } } )
oSubMenu:addItem( { "ISO 2022-JP " , {|| oIde:setCodec( "ISO 2022-JP" ) } } )
oSubMenu:addItem( { "Apple Roman " , {|| oIde:setCodec( "Apple Roman" ) } } )
oSubMenu:addItem( { "Big5 " , {|| oIde:setCodec( "Big5" ) } } )
oSubMenu:addItem( { "Big5-HKSCS " , {|| oIde:setCodec( "Big5-HKSCS" ) } } )
oSubMenu:addItem( { "CP949 " , {|| oIde:setCodec( "CP949" ) } } )
oSubMenu:addItem( { "EUC-JP " , {|| oIde:setCodec( "EUC-JP" ) } } )
oSubMenu:addItem( { "EUC-KR " , {|| oIde:setCodec( "EUC-KR" ) } } )
oSubMenu:addItem( { "GB18030-0 " , {|| oIde:setCodec( "GB18030-0" ) } } )
oSubMenu:addItem( { "IBM 850 " , {|| oIde:setCodec( "IBM 850" ) } } )
oSubMenu:addItem( { "IBM 866 " , {|| oIde:setCodec( "IBM 866" ) } } )
oSubMenu:addItem( { "IBM 874 " , {|| oIde:setCodec( "IBM 874" ) } } )
oSubMenu:addItem( { "ISO 2022-JP " , {|| oIde:setCodec( "ISO 2022-JP" ) } } )
oSub1 := XbpMenu():new( oSubMenu ):create()
oSub1:title := "ISO 8859-1 to 10"
oSub1:addItem( { "-1" , {|| oIde:setCodec( "ISO 8859-1" ) } } )
oSub1:addItem( { "-2" , {|| oIde:setCodec( "ISO 8859-2" ) } } )
oSub1:addItem( { "-3" , {|| oIde:setCodec( "ISO 8859-3" ) } } )
oSub1:addItem( { "-4" , {|| oIde:setCodec( "ISO 8859-4" ) } } )
oSub1:addItem( { "-5" , {|| oIde:setCodec( "ISO 8859-5" ) } } )
oSub1:addItem( { "-6" , {|| oIde:setCodec( "ISO 8859-6" ) } } )
oSub1:addItem( { "-7" , {|| oIde:setCodec( "ISO 8859-7" ) } } )
oSub1:addItem( { "-8" , {|| oIde:setCodec( "ISO 8859-8" ) } } )
oSub1:addItem( { "-9" , {|| oIde:setCodec( "ISO 8859-9" ) } } )
oSub1:addItem( { "-10" , {|| oIde:setCodec( "ISO 8859-10" ) } } )
oSub1:addItem( { "-1" , {|| oIde:setCodec( "ISO 8859-1" ) } } )
oSub1:addItem( { "-2" , {|| oIde:setCodec( "ISO 8859-2" ) } } )
oSub1:addItem( { "-3" , {|| oIde:setCodec( "ISO 8859-3" ) } } )
oSub1:addItem( { "-4" , {|| oIde:setCodec( "ISO 8859-4" ) } } )
oSub1:addItem( { "-5" , {|| oIde:setCodec( "ISO 8859-5" ) } } )
oSub1:addItem( { "-6" , {|| oIde:setCodec( "ISO 8859-6" ) } } )
oSub1:addItem( { "-7" , {|| oIde:setCodec( "ISO 8859-7" ) } } )
oSub1:addItem( { "-8" , {|| oIde:setCodec( "ISO 8859-8" ) } } )
oSub1:addItem( { "-9" , {|| oIde:setCodec( "ISO 8859-9" ) } } )
oSub1:addItem( { "-10" , {|| oIde:setCodec( "ISO 8859-10" ) } } )
oSubMenu:addItem( { oSub1, NIL } )
oSub1 := XbpMenu():new( oSubMenu ):create()
oSub1:title := "ISO 8859-13 to 16"
oSub1:addItem( { "-13" , {|| oIde:setCodec( "ISO 8859-13" ) } } )
oSub1:addItem( { "-14" , {|| oIde:setCodec( "ISO 8859-14" ) } } )
oSub1:addItem( { "-15" , {|| oIde:setCodec( "ISO 8859-15" ) } } )
oSub1:addItem( { "-16" , {|| oIde:setCodec( "ISO 8859-16" ) } } )
oSub1:addItem( { "-13" , {|| oIde:setCodec( "ISO 8859-13" ) } } )
oSub1:addItem( { "-14" , {|| oIde:setCodec( "ISO 8859-14" ) } } )
oSub1:addItem( { "-15" , {|| oIde:setCodec( "ISO 8859-15" ) } } )
oSub1:addItem( { "-16" , {|| oIde:setCodec( "ISO 8859-16" ) } } )
oSubMenu:addItem( { oSub1, NIL } )
//oSubMenu:addItem( { "Iscii " , {|| oIde:setCodec( "Iscii" ) } } ) //-Bng, Dev, Gjr, Knd, Mlm, Ori, Pnj, Tlg, Tml
oSub1 := XbpMenu():new( oSubMenu ):create()
oSub1:title := "Iscii"
oSub1:addItem( { "-Bng" , {|| oIde:setCodec( "Iscii-Bng" ) } } )
oSub1:addItem( { "-Dev" , {|| oIde:setCodec( "Iscii-Dev" ) } } )
oSub1:addItem( { "-Gjr" , {|| oIde:setCodec( "Iscii-Gjr" ) } } )
oSub1:addItem( { "-Knd" , {|| oIde:setCodec( "Iscii-Knd" ) } } )
oSub1:addItem( { "-Mlm" , {|| oIde:setCodec( "Iscii-Mlm" ) } } )
oSub1:addItem( { "-Ori" , {|| oIde:setCodec( "Iscii-Ori" ) } } )
oSub1:addItem( { "-Pnj" , {|| oIde:setCodec( "Iscii-Pnj" ) } } )
oSub1:addItem( { "-Tlg" , {|| oIde:setCodec( "Iscii-Tlg" ) } } )
oSub1:addItem( { "-Tml" , {|| oIde:setCodec( "Iscii-Tml" ) } } )
oSub1:addItem( { "-Bng" , {|| oIde:setCodec( "Iscii-Bng" ) } } )
oSub1:addItem( { "-Dev" , {|| oIde:setCodec( "Iscii-Dev" ) } } )
oSub1:addItem( { "-Gjr" , {|| oIde:setCodec( "Iscii-Gjr" ) } } )
oSub1:addItem( { "-Knd" , {|| oIde:setCodec( "Iscii-Knd" ) } } )
oSub1:addItem( { "-Mlm" , {|| oIde:setCodec( "Iscii-Mlm" ) } } )
oSub1:addItem( { "-Ori" , {|| oIde:setCodec( "Iscii-Ori" ) } } )
oSub1:addItem( { "-Pnj" , {|| oIde:setCodec( "Iscii-Pnj" ) } } )
oSub1:addItem( { "-Tlg" , {|| oIde:setCodec( "Iscii-Tlg" ) } } )
oSub1:addItem( { "-Tml" , {|| oIde:setCodec( "Iscii-Tml" ) } } )
oSubMenu:addItem( { oSub1, NIL } )
oSubMenu:addItem( { "JIS X 0201 " , {|| oIde:setCodec( "JIS X 0201" ) } } )
oSubMenu:addItem( { "JIS X 0208 " , {|| oIde:setCodec( "JIS X 0208" ) } } )
oSubMenu:addItem( { "KOI8-R " , {|| oIde:setCodec( "KOI8-R" ) } } )
oSubMenu:addItem( { "KOI8-U " , {|| oIde:setCodec( "KOI8-U" ) } } )
oSubMenu:addItem( { "MuleLao-1 " , {|| oIde:setCodec( "MuleLao-1" ) } } )
oSubMenu:addItem( { "ROMAN8 " , {|| oIde:setCodec( "ROMAN8" ) } } )
oSubMenu:addItem( { "Shift-JIS " , {|| oIde:setCodec( "Shift-JIS" ) } } )
oSubMenu:addItem( { "TIS-620 " , {|| oIde:setCodec( "TIS-620" ) } } )
oSubMenu:addItem( { "TSCII " , {|| oIde:setCodec( "TSCII" ) } } )
oSubMenu:addItem( { "UTF-8 " , {|| oIde:setCodec( "UTF-8" ) } } )
oSubMenu:addItem( { "UTF-16 " , {|| oIde:setCodec( "UTF-16" ) } } )
oSubMenu:addItem( { "UTF-16BE " , {|| oIde:setCodec( "UTF-16BE" ) } } )
oSubMenu:addItem( { "UTF-16LE " , {|| oIde:setCodec( "UTF-16LE" ) } } )
oSubMenu:addItem( { "UTF-32 " , {|| oIde:setCodec( "UTF-32" ) } } )
oSubMenu:addItem( { "UTF-32BE " , {|| oIde:setCodec( "UTF-32BE" ) } } )
oSubMenu:addItem( { "UTF-32LE " , {|| oIde:setCodec( "UTF-32LE" ) } } )
oSubMenu:addItem( { "JIS X 0201 " , {|| oIde:setCodec( "JIS X 0201" ) } } )
oSubMenu:addItem( { "JIS X 0208 " , {|| oIde:setCodec( "JIS X 0208" ) } } )
oSubMenu:addItem( { "KOI8-R " , {|| oIde:setCodec( "KOI8-R" ) } } )
oSubMenu:addItem( { "KOI8-U " , {|| oIde:setCodec( "KOI8-U" ) } } )
oSubMenu:addItem( { "MuleLao-1 " , {|| oIde:setCodec( "MuleLao-1" ) } } )
oSubMenu:addItem( { "ROMAN8 " , {|| oIde:setCodec( "ROMAN8" ) } } )
oSubMenu:addItem( { "Shift-JIS " , {|| oIde:setCodec( "Shift-JIS" ) } } )
oSubMenu:addItem( { "TIS-620 " , {|| oIde:setCodec( "TIS-620" ) } } )
oSubMenu:addItem( { "TSCII " , {|| oIde:setCodec( "TSCII" ) } } )
oSubMenu:addItem( { "UTF-8 " , {|| oIde:setCodec( "UTF-8" ) } } )
oSubMenu:addItem( { "UTF-16 " , {|| oIde:setCodec( "UTF-16" ) } } )
oSubMenu:addItem( { "UTF-16BE " , {|| oIde:setCodec( "UTF-16BE" ) } } )
oSubMenu:addItem( { "UTF-16LE " , {|| oIde:setCodec( "UTF-16LE" ) } } )
oSubMenu:addItem( { "UTF-32 " , {|| oIde:setCodec( "UTF-32" ) } } )
oSubMenu:addItem( { "UTF-32BE " , {|| oIde:setCodec( "UTF-32BE" ) } } )
oSubMenu:addItem( { "UTF-32LE " , {|| oIde:setCodec( "UTF-32LE" ) } } )
//oSubMenu:addItem( { "Windows " , {|| oIde:setCodec( "Windows" ) } } ) //-1250 to 1258
oSub1 := XbpMenu():new( oSubMenu ):create()
oSub1:title := "Windows-1250 to 1258"
oSub1:addItem( { "-1250" , {|| oIde:setCodec( "Windows-1250" ) } } )
oSub1:addItem( { "-1251" , {|| oIde:setCodec( "Windows-1251" ) } } )
oSub1:addItem( { "-1252" , {|| oIde:setCodec( "Windows-1252" ) } } )
oSub1:addItem( { "-1253" , {|| oIde:setCodec( "Windows-1253" ) } } )
oSub1:addItem( { "-1254" , {|| oIde:setCodec( "Windows-1254" ) } } )
oSub1:addItem( { "-1255" , {|| oIde:setCodec( "Windows-1255" ) } } )
oSub1:addItem( { "-1256" , {|| oIde:setCodec( "Windows-1256" ) } } )
oSub1:addItem( { "-1257" , {|| oIde:setCodec( "Windows-1257" ) } } )
oSub1:addItem( { "-1258" , {|| oIde:setCodec( "Windows-1258" ) } } )
oSub1:addItem( { "-1250" , {|| oIde:setCodec( "Windows-1250" ) } } )
oSub1:addItem( { "-1251" , {|| oIde:setCodec( "Windows-1251" ) } } )
oSub1:addItem( { "-1252" , {|| oIde:setCodec( "Windows-1252" ) } } )
oSub1:addItem( { "-1253" , {|| oIde:setCodec( "Windows-1253" ) } } )
oSub1:addItem( { "-1254" , {|| oIde:setCodec( "Windows-1254" ) } } )
oSub1:addItem( { "-1255" , {|| oIde:setCodec( "Windows-1255" ) } } )
oSub1:addItem( { "-1256" , {|| oIde:setCodec( "Windows-1256" ) } } )
oSub1:addItem( { "-1257" , {|| oIde:setCodec( "Windows-1257" ) } } )
oSub1:addItem( { "-1258" , {|| oIde:setCodec( "Windows-1258" ) } } )
oSubMenu:addItem( { oSub1, NIL } )
oSubMenu:addItem( { "WINSAMI2 " , {|| oIde:setCodec( "WINSAMI2" ) } } )
oSubMenu:addItem( { "WINSAMI2 " , {|| oIde:setCodec( "WINSAMI2" ) } } )
oMenuBar:addItem( { oSubMenu, NIL } )
oSubMenu := XbpMenu():new( oMenuBar ):create()
oSubMenu:title := "~Tools"
oSubMenu:addItem( { _T( "Configure Tools...*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Configure Tools...*" ) , {|| oIde:executeAction( "" ) } } )
MenuAddSep( oSubMenu )
// TODO: Load custom TOOLS LINK from .INI file
#ifdef __PLATFORM__WINDOWS
oSubMenu:addItem( { _T( "Command Prompt...*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Command Prompt...*" ) , {|| oIde:executeAction( "" ) } } )
#else
oSubMenu:addItem( { _T( "Terminal" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "Terminal" ) , {|| oIde:executeAction( "" ) } } )
#endif
oMenuBar:addItem( { oSubMenu, NIL } )
oSubMenu := XbpMenu():new( oMenuBar ):create()
oSubMenu:title := "~Help"
oSubMenu:addItem( { _T( "About...*" ) , {|| oIde:executeAction( "" ) } } )
oSubMenu:addItem( { _T( "About...*" ) , {|| oIde:executeAction( "" ) } } )
oMenuBar:addItem( { oSubMenu, NIL } )
Return Nil

View File

@@ -350,32 +350,24 @@ METHOD IdeDocks:buildOutputResults()
/*----------------------------------------------------------------------*/
METHOD IdeDocks:outputDoubleClicked( lSelected )
LOCAL qCursor, cText, n, cSource, nLine, cLine
LOCAL qCursor, cText
LOCAL cSource, nLine
IF lSelected
::nPass++
IF ::nPass == 1
qCursor := QTextCursor():configure( ::oOutputResult:oWidget:textCursor() )
cText := QTextBlock():configure( qCursor:block() ):text()
IF ( n := at( "Error", cText ) ) > 0
cLine := alltrim( substr( cText, 1, n - 1 ) )
ELSEIF ( n := at( "Warning", cText ) ) > 0
cLine := alltrim( substr( cText, 1, n - 1 ) )
ENDIF
IF !empty( cLine )
IF ( n := at( "(", cLine ) ) > 0
cSource := alltrim( substr( cLine, 1, n - 1 ) )
cLine := substr( cLine, n + 1 )
n := at( ")", cLine )
nLine := val( substr( cLine, 1, n - 1 ) )
::oIde:editSource( cSource )
qCursor := QTextCursor():configure( ::oIde:qCurEdit:textCursor() )
qCursor:setPosition( 0 )
qCursor:movePosition( QTextCursor_Down, QTextCursor_MoveAnchor, nLine )
::oIde:qCurEdit:setTextCursor( qCursor )
ELSE
nLine := 0
ENDIF
IF ParseFNfromStatusMsg( cText, @cSource, @nLine, .T. )
::oIde:editSource( cSource )
qCursor := QTextCursor():configure( ::oIde:qCurEdit:textCursor() )
nLine := iif( nLine < 1, 0, nLine - 1 )
qCursor:setPosition( 0 )
qCursor:movePosition( QTextCursor_Down, QTextCursor_MoveAnchor, nLine )
::oIde:qCurEdit:setTextCursor( qCursor )
::oIde:manageFocusInEditor()
ENDIF
ENDIF
IF ::nPass >= 2

View File

@@ -71,6 +71,8 @@
#include "hbide.ch"
STATIC aRegList
/*----------------------------------------------------------------------*/
PROCEDURE AppSys()
@@ -464,9 +466,120 @@ FUNCTION PathNormalized( cPath, lLower )
RETURN IF( lLower, lower( s ), s )
/*----------------------------------------------------------------------*/
/*
* This function fills an array with the list of regular expressions that will
* identify the errors messages retrieved from during the build process.
* 29/12/2009 - 12:43:26 - vailtom
*/
#define MSG_TYPE_ERR 1
#define MSG_TYPE_INFO 2
#define MSG_TYPE_WARN 3
#define CLR_MSG_ERR 'red'
#define CLR_MSG_INFO 'brown'
#define CLR_MSG_WARN 'blue'
STATIC ;
FUNCTION BuildRegExpressList( aRegList )
AAdd( aRegList, { MSG_TYPE_WARN, hb_RegexComp( ".*: warning.*" ) })
AAdd( aRegList, { MSG_TYPE_WARN, hb_RegexComp( ".*\) Warning W.*" ) })
AAdd( aRegList, { MSG_TYPE_WARN, hb_RegexComp( "^Warning W([0-9]+).*" ) })
AAdd( aRegList, { MSG_TYPE_ERR , hb_RegexComp( ".*: error.*" ) })
AAdd( aRegList, { MSG_TYPE_ERR , hb_RegexComp( ".*\) Error E.*" ) })
AAdd( aRegList, { MSG_TYPE_ERR , hb_RegexComp( "^Error E([0-9]+).*" ) })
AAdd( aRegList, { MSG_TYPE_ERR , hb_RegexComp( "^Error: ." ) })
AAdd( aRegList, { MSG_TYPE_ERR , hb_RegexComp( ".*:([0-9]+):([\w|\s]*)error.*" ) })
AAdd( aRegList, { MSG_TYPE_ERR , hb_RegexComp( ".*:\(\.\w+\+.*\):.*" ) })
AAdd( aRegList, { MSG_TYPE_ERR , hb_RegexComp( ".*: fatal\s.*" ) })
AAdd( aRegList, { MSG_TYPE_INFO, hb_RegexComp( ".*: note.*" ) })
AAdd( aRegList, { MSG_TYPE_INFO, hb_RegexComp( ".*: In function '.*" ) })
AAdd( aRegList, { MSG_TYPE_INFO, hb_RegexComp( "^(\s*).*\s: see.*" ) })
RETURN NIL
/*
* Catch source file name & line error from an msg status from compiler result.
* 29/12/2009 - 13:22:29 - vailtom
*/
FUNCTION ParseFNfromStatusMsg( cText, cFileName, nLine, lValidText )
LOCAL regLineN := hb_RegexComp( ".*(\(([0-9]+)\)|:([0-9]+):|\s([0-9]+):).*" )
LOCAL aList
LOCAL nPos
DEFAULT lValidText TO .T.
cFileName := ''
nLine := 0
* Validate if current text is a error/warning/info message.
* 29/12/2009 - 22:51:39 - vailtom
IF lValidText
nPos := aScan( aRegList, {| reg | !Empty( hb_RegEx( reg[ 2 ], cText ) ) } )
IF ( nPos <= 0 )
RETURN .F.
End
End
aList := hb_RegEx( regLineN, cText )
IF !Empty(aList)
nLine := alltrim( aList[2] )
cText := Substr( cText, 1, At( nLine, cText ) -1 )
cText := alltrim( cText ) + '('
nLine := strtran( nLine, ":", "" )
nLine := strtran( nLine, "(", "" )
nLine := strtran( nLine, ")", "" )
nLine := VAL( alltrim( nLine ) )
End
IF (nPos := hb_At( '(', cText )) > 0
cFileName := alltrim( Subst( cText, 1, nPos -1 ) )
ELSE
IF (nPos := At( 'referenced from', Lower( cText ) )) <> 00
cFileName := Subst( cText, nPos + Len( 'referenced from' ) )
ELSE
* GCC & MSVC filename detect...
IF Subst( cText, 2, 1 ) == ':'
nPos := hb_At( ':', cText, 3 )
ELSE
nPos := hb_At( ':', cText )
End
IF nPos <> 00
cFileName := Subst( cText, 1, nPos-1 )
End
End
End
cFileName := strtran( cFileName, "(", "" )
cFileName := strtran( cFileName, ")", "" )
cFileName := alltrim( cFileName )
cFileName := strtran( cFileName, "\\", "/" ) && Fix for the BCC
cFileName := strtran( cFileName, "\" , "/" )
IF (nPos := Rat( ' ', cFileName )) <> 00
cFileName := Subst( cFileName, nPos+1 )
End
IF Subst( cFileName, 2, 1 ) == ':'
nPos := hb_At( ':', cFileName, 3 )
ELSE
nPos := hb_At( ':', cFileName )
End
IF nPos <> 00
cFileName := Subst( cFileName, 1, nPos-1 )
End
cFileName := alltrim( cFileName )
RETURN !Empty( cFileName )
/*
* This function parses compiler result and hightlight errors & warnings using
* regular expressions.
* regular expressions. (vailtom)
*
* More about Qt Color names:
* http://www.w3.org/TR/SVG/types.html#ColorKeywords
@@ -474,10 +587,15 @@ FUNCTION PathNormalized( cPath, lLower )
* 28/12/2009 - 16:17:37
*/
FUNCTION ConvertBuildStatusMsgToHtml( cText, oWidget )
LOCAL aColors := { CLR_MSG_ERR, CLR_MSG_INFO, CLR_MSG_WARN }
LOCAL aLines
LOCAL cLine
LOCAL aRegWarns := {}
LOCAL aRegErrors := {}
LOCAL nPos
IF aRegList == NIL
aRegList := {}
BuildRegExpressList( aRegList )
End
oWidget:clear()
@@ -499,21 +617,16 @@ FUNCTION ConvertBuildStatusMsgToHtml( cText, oWidget )
cText := '<pre><code>'
oWidget:insertHTML( cText )
AAdd( aRegWarns, hb_RegexComp( ".*: warning.*" ) )
AAdd( aRegWarns, hb_RegexComp( ".*\) Warning W.*" ) )
AAdd( aRegErrors, hb_RegexComp( ".*: error.*" ) )
AAdd( aRegErrors, hb_RegexComp( ".*\) Error E.*" ) )
FOR EACH cLine IN aLines
IF Empty( cLine )
*
ELSEIF aScan( aRegWarns, {| reg | !Empty( hb_RegEx( reg, cLine ) ) } ) > 0
cLine := '<font color=blue>' + cLine + '</font>'
ELSEIF aScan( aRegErrors, {| reg | !Empty( hb_RegEx( reg, cLine ) ) } ) > 0
cLine := '<font color=red>' + cLine + '</font>'
IF !Empty( cLine )
nPos := aScan( aRegList, {| reg | !Empty( hb_RegEx( reg[ 2 ], cLine ) ) } )
IF ( nPos > 0 )
cLine := '<font color=' + aColors[ aRegList[nPos,1] ] + '>' +;
cLine + '</font>'
End
ENDIF
oWidget:append( cLine )
@@ -523,6 +636,7 @@ FUNCTION ConvertBuildStatusMsgToHtml( cText, oWidget )
cText += '</code></pre>'
oWidget:insertHTML( '</code></pre>' )
RETURN cText
/*----------------------------------------------------------------------*/

View File

@@ -69,86 +69,173 @@
/*----------------------------------------------------------------------*/
FUNCTION GetStyleSheet( cWidget )
LOCAL s := ""
LOCAL txt_:= {}
LOCAL s := ""
DO CASE
CASE cWidget == "QMenu"
aadd( txt_, ' QMenu { ' )
aadd( txt_, ' background-color: white; ' )
aadd( txt_, ' margin: 2px; /* some spacing around the menu */ ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::item { ' )
aadd( txt_, ' padding: 2px 25px 2px 20px; ' )
aadd( txt_, ' border: 1px solid transparent; /* reserve space for selection border */ ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::item:selected { ' )
aadd( txt_, ' border-color: darkblue; ' )
aadd( txt_, ' background: rgba(100, 100, 100, 150); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::icon:checked { /* appearance of a "checked" icon */ ' )
aadd( txt_, ' background: gray; ' )
aadd( txt_, ' border: 1px inset gray; ' )
aadd( txt_, ' position: absolute; ' )
aadd( txt_, ' top: 1px; ' )
aadd( txt_, ' right: 1px; ' )
aadd( txt_, ' bottom: 1px; ' )
aadd( txt_, ' left: 1px; ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::separator { ' )
aadd( txt_, ' height: 2px; ' )
aadd( txt_, ' background: lightblue; ' )
aadd( txt_, ' margin-left: 10px; ' )
aadd( txt_, ' margin-right: 5px; ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::indicator { ' )
aadd( txt_, ' width: 13px; ' )
aadd( txt_, ' height: 13px; ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::indicator:non-exclusive:unchecked { ' )
aadd( txt_, ' image: url(:/images/checkbox_unchecked.png); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::indicator:non-exclusive:unchecked:selected { ' )
aadd( txt_, ' image: url(:/images/checkbox_unchecked_hover.png); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::indicator:non-exclusive:checked { ' )
aadd( txt_, ' image: url(:/images/checkbox_checked.png); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::indicator:non-exclusive:checked:selected { ' )
aadd( txt_, ' image: url(:/images/checkbox_checked_hover.png); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::indicator:exclusive:unchecked { ' )
aadd( txt_, ' image: url(:/images/radiobutton_unchecked.png); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::indicator:exclusive:unchecked:selected { ' )
aadd( txt_, ' image: url(:/images/radiobutton_unchecked_hover.png); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::indicator:exclusive:checked { ' )
aadd( txt_, ' image: url(:/images/radiobutton_checked.png); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QMenu::indicator:exclusive:checked:selected { ' )
aadd( txt_, ' image: url(:/images/radiobutton_checked_hover.png); ' )
aadd( txt_, ' } ' )
CASE cWidget == "QMenuBar"
aadd( txt_, 'QMenuBar { ' )
aadd( txt_, ' background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, ' )
aadd( txt_, ' stop:0 lightgray, stop:1 darkgray); ' )
aadd( txt_, '} ' )
aadd( txt_, 'QMenuBar::item { ' )
aadd( txt_, ' spacing: 3px; /* spacing between menu bar items */ ' )
aadd( txt_, ' padding: 1px 4px; ' )
aadd( txt_, ' background: transparent; ' )
aadd( txt_, ' border-radius: 4px; ' )
aadd( txt_, '} ' )
aadd( txt_, 'QMenuBar::item:selected { /* when selected using mouse or keyboard */ ' )
aadd( txt_, ' background: #a8a8a8; ' )
aadd( txt_, '} ' )
aadd( txt_, 'QMenuBar::item:pressed { ' )
aadd( txt_, ' background: #888888; ' )
aadd( txt_, '} ' )
CASE cWidget == "QToolBar"
aadd( txt_, 'QToolBar { ' )
aadd( txt_, ' height: 24; ' )
aadd( txt_, ' spacing: 3px; /* spacing between items in the tool bar */ ' )
aadd( txt_, ' } ' )
CASE cWidget == "QTreeWidget"
s += " QTreeWidget {" +;
" alternate-background-color: yellow;" +;
" }" +;
" QTreeWidget {" +;
" show-decoration-selected: 1;" +;
" }" +;
" QTreeWidget::item:alternate {" +;
" background: #EEEEEE;" +;
" }" +;
" QTreeWidget::item:selected {" +;
" border: 1px solid #6a6ea9;" +;
" }" +;
" QTreeWidget::item:selected:!active {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," +;
" stop: 0 #ABAFE5, stop: 1 #8588B2);" +;
" }" +;
" QTreeWidget::item:selected:active {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," +;
" stop: 0 #6a6ea9, stop: 1 #888dd9);" +;
" }" +;
" QTreeWidget::item:hover {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," +;
" stop: 0 #FAFBFE, stop: 1 #DCDEF1);" +;
"}" +;
" QTreeWidget {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0," +;
" stop: 0 rgba(173, 173, 173, 255), stop:1 rgba(255, 255, 255, 255));" +;
"}"
aadd( txt_, ' QTreeWidget { ' )
aadd( txt_, ' alternate-background-color: yellow; ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QTreeWidget { ' )
aadd( txt_, ' show-decoration-selected: 1; ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QTreeWidget::item:alternate { ' )
aadd( txt_, ' background: #EEEEEE; ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QTreeWidget::item:selected { ' )
aadd( txt_, ' border: 1px solid #6a6ea9; ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QTreeWidget::item:selected:!active { ' )
aadd( txt_, ' background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, ' )
aadd( txt_, ' stop: 0 #ABAFE5, stop: 1 #8588B2); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QTreeWidget::item:selected:active { ' )
aadd( txt_, ' background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, ' )
aadd( txt_, ' stop: 0 #6a6ea9, stop: 1 #888dd9); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QTreeWidget::item:hover { ' )
aadd( txt_, ' background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, ' )
aadd( txt_, ' stop: 0 #FAFBFE, stop: 1 #DCDEF1); ' )
aadd( txt_, '} ' )
aadd( txt_, ' QTreeWidget { ' )
aadd( txt_, ' background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, ' )
aadd( txt_, ' stop: 0 rgba(173, 173, 173, 255), stop:1 rgba(255, 255, 255, 255)); ' )
aadd( txt_, '} ' )
CASE cWidget == "QListView"
s += "" +;
" QListView {" +;
" alternate-background-color: yellow;" +;
" }" +;
" QListView {" +;
" show-decoration-selected: 1;" +;
" }" +;
" QListView::item:alternate {" +;
" background: #EEEEEE;" +;
" }" +;
" QListView::item:selected {" +;
" border: 1px solid #6a6ea9;" +;
" }" +;
" QListView::item:selected:!active {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," +;
" stop: 0 #ABAFE5, stop: 1 #8588B2);" +;
" }" +;
" QListView::item:selected:active {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," +;
" stop: 0 #6a6ea9, stop: 1 #888dd9);" +;
" }" +;
" QListView::item:hover {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1," +;
" stop: 0 #FAFBFE, stop: 1 #DCDEF1);" +;
"}" +;
" QListView {" +;
" background: qlineargradient(spread:pad, x1:0.755727, y1:0.864, x2:1, y2:0," +;
" stop:0 rgba(214, 209, 142, 255), stop:1 rgba(255, 255, 255, 255));" +;
"}"
aadd( txt_, ' QListView { ' )
aadd( txt_, ' alternate-background-color: yellow; ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QListView { ' )
aadd( txt_, ' show-decoration-selected: 1; ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QListView::item:alternate { ' )
aadd( txt_, ' background: #EEEEEE; ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QListView::item:selected { ' )
aadd( txt_, ' border: 1px solid #6a6ea9; ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QListView::item:selected:!active { ' )
aadd( txt_, ' background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, ' )
aadd( txt_, ' stop: 0 #ABAFE5, stop: 1 #8588B2); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QListView::item:selected:active { ' )
aadd( txt_, ' background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, ' )
aadd( txt_, ' stop: 0 #6a6ea9, stop: 1 #888dd9); ' )
aadd( txt_, ' } ' )
aadd( txt_, ' QListView::item:hover { ' )
aadd( txt_, ' background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, ' )
aadd( txt_, ' stop: 0 #FAFBFE, stop: 1 #DCDEF1); ' )
aadd( txt_, '} ' )
aadd( txt_, ' QListView { ' )
aadd( txt_, ' background: qlineargradient(spread:pad, x1:0.755727, y1:0.864, x2:1, y2:0,' )
aadd( txt_, ' stop:0 rgba(214, 209, 142, 255), stop:1 rgba(255, 255, 255, 255));' )
aadd( txt_, '} ' )
CASE cWidget == "QMainWindow"
s += "QMainWindow::separator {" +;
" background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0," +;
" stop: 0 rgba(123, 123, 123, 255), stop:1 rgba(255, 255, 255, 255));" +;
" width: 6px; /* when vertical */" +;
" height: 6px; /* when horizontal */" +;
"}" +;
"QMainWindow::separator:hover {" +;
" background: red;" +;
"}"
aadd( txt_, 'QMainWindow::separator { ' )
aadd( txt_, ' background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, ' )
aadd( txt_, ' stop: 0 rgba(123, 123, 123, 255), stop:1 rgba(255, 255, 255, 255)); ' )
aadd( txt_, ' width: 6px; /* when vertical */ ' )
aadd( txt_, ' height: 6px; /* when horizontal */ ' )
aadd( txt_, '} ' )
aadd( txt_, 'QMainWindow::separator:hover { ' )
aadd( txt_, ' background: red; ' )
aadd( txt_, '} ' )
ENDCASE
aeval( txt_, {|e| s += trim( e ) + chr( 13 ) + chr( 10 ) } )
RETURN s
/*----------------------------------------------------------------------*/

Binary file not shown.

After

Width:  |  Height:  |  Size: 555 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 2.9 KiB