From 13aac5647a5ffee9cafd4e07b3838b4e9fc7e3dc Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Fri, 1 Jan 2010 02:33:46 +0000 Subject: [PATCH] 2009-12-31 18:32 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) * contrib/hbide/hbide.ch * contrib/hbide/hbide.hbp * contrib/hbide/hbide.prg * contrib/hbide/ideactions.prg * contrib/hbide/idemisc.prg * contrib/hbide/idesaveload.prg + contrib/hbide/idethemes.prg * contrib/hbide/resources/themes.ui + Added class to save/load themes, a work-in-progress. You can just play with user interface. More to come soon. --- harbour/ChangeLog | 12 + harbour/contrib/hbide/hbide.ch | 3 +- harbour/contrib/hbide/hbide.hbp | 2 + harbour/contrib/hbide/hbide.prg | 87 +-- harbour/contrib/hbide/ideactions.prg | 10 +- harbour/contrib/hbide/idemisc.prg | 118 +---- harbour/contrib/hbide/idesaveload.prg | 23 +- harbour/contrib/hbide/idethemes.prg | 613 ++++++++++++++++++++++ harbour/contrib/hbide/resources/themes.ui | 53 +- 9 files changed, 732 insertions(+), 189 deletions(-) create mode 100644 harbour/contrib/hbide/idethemes.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 5f41838398..414569cc9a 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,18 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-12-31 18:32 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + * contrib/hbide/hbide.ch + * contrib/hbide/hbide.hbp + * contrib/hbide/hbide.prg + * contrib/hbide/ideactions.prg + * contrib/hbide/idemisc.prg + * contrib/hbide/idesaveload.prg + + contrib/hbide/idethemes.prg + * contrib/hbide/resources/themes.ui + + Added class to save/load themes, a work-in-progress. + You can just play with user interface. More to come soon. + 2009-12-31 19:07 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Added QT MinGW version requirement information. diff --git a/harbour/contrib/hbide/hbide.ch b/harbour/contrib/hbide/hbide.ch index 013279afe8..ca11d2baf3 100644 --- a/harbour/contrib/hbide/hbide.ch +++ b/harbour/contrib/hbide/hbide.ch @@ -75,8 +75,9 @@ #define GotoDialogGeometry 8 #define PropsDialogGeometry 9 #define FindDialogGeometry 10 +#define ThemesDialogGeometry 11 -#define INI_HBIDE_VRBLS 10 +#define INI_HBIDE_VRBLS 11 /* .hbi structure constants */ #define PRJ_PRP_PROPERTIES 1 diff --git a/harbour/contrib/hbide/hbide.hbp b/harbour/contrib/hbide/hbide.hbp index 2fdc495d6d..475fb9755d 100644 --- a/harbour/contrib/hbide/hbide.hbp +++ b/harbour/contrib/hbide/hbide.hbp @@ -24,4 +24,6 @@ idefindreplace.prg idedocks.prg idesaveload.prg iderequests.prg +idethemes.prg + ideparseexpr.c diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg index 9c567eb911..1e9885d5b7 100644 --- a/harbour/contrib/hbide/hbide.prg +++ b/harbour/contrib/hbide/hbide.prg @@ -241,6 +241,9 @@ CLASS HbIde DATA aEdits INIT {} + DATA cIniThemes + DATA oThemes + ENDCLASS /*----------------------------------------------------------------------*/ @@ -275,6 +278,9 @@ METHOD HbIde:create( cProjIni ) SetAppWindow( ::oDlg ) ::oDlg:Show() + /* Load HBIDE define | User Defined Themes */ + LoadThemes( Self ) + ::oDa:oTabWidget := XbpTabWidget():new():create( ::oDa, , {0,0}, {10,10}, , .t. ) // ::oDa:oTabWidget:oWidget:setTabsClosable( .t. ) ::oDa:oTabWidget:oWidget:setUsesScrollButtons( .f. ) @@ -1604,7 +1610,7 @@ METHOD HbIde:getCurrentProject() /* hb_processRun( , [ ], [ @ ], [ @ ], [ ] ) -> */ METHOD HbIde:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt ) - LOCAL cCmd, cOutput, cErrors, n, aPrj, cHbpPath, aHbp, qStringList + LOCAL cOutput, cErrors, n, aPrj, cHbpPath, aHbp, qStringList LOCAL cTmp, nResult LOCAL nseconds LOCAL cTargetFN @@ -1707,20 +1713,9 @@ METHOD HbIde:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt ) ::lDockBVisible := .t. ::oDockB2:show() - cTmp := "Project: " + cProject + CRLF + ; - "Launch.: " + iif( lLaunch, 'Yes', 'No' ) + CRLF + ; - "Rebuild: " + iif( lRebuild, 'Yes', 'No' ) + CRLF + ; - CRLF + ; - 'Started at ' + time() + CRLF + ; - '-----------------------------------------------------------------' + CRLF - cCmd := "hbmk2.exe " + cHbpPath - nSeconds := seconds() // time elapsed IF lViaQt - ::lDockBVisible := .t. - ::oDockB2:show() - ::cProcessInfo := "" qStringList := QStringList():new() @@ -1740,7 +1735,15 @@ METHOD HbIde:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt ) ::qProcess:start( "hbmk2.exe", qStringList ) ELSE - nResult := hb_processRun( cCmd, , @cOutput, @cErrors ) + cTmp := "Project: " + cProject + CRLF + ; + "Launch.: " + iif( lLaunch, 'Yes', 'No' ) + CRLF + ; + "Rebuild: " + iif( lRebuild, 'Yes', 'No' ) + CRLF + ; + CRLF + ; + 'Started at ' + time() + CRLF + ; + '-----------------------------------------------------------------' + CRLF + + cOutput := "" ; cErrors := "" + nResult := hb_processRun( ( "hbmk2.exe " + cHbpPath ), , @cOutput, @cErrors ) * Show detailed status about compile process... cTmp += cOutput + CRLF @@ -1770,10 +1773,10 @@ METHOD HbIde:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt ) ENDIF ENDIF + + ConvertBuildStatusMsgToHtml( cTmp, ::oOutputResult:oWidget ) ENDIF - //::oOutputResult:oWidget:setHtml( ConvertBuildStatusMsgToHtml( cTmp ) ) - ConvertBuildStatusMsgToHtml( cTmp, ::oOutputResult:oWidget ) ENDIF IF lDelHbp @@ -1792,64 +1795,30 @@ 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 } ) - aPrj := ::aProjects[ n,3 ] - cHbpPath := aPrj[ PRJ_PRP_PROPERTIES, 2, PRJ_PRP_LOCATION ] + s_pathSep + aPrj[ PRJ_PRP_PROPERTIES, 2, PRJ_PRP_OUTPUT ] + ".hbp" - - aHbp := {} - aeval( aPrj[ PRJ_PRP_FLAGS, 2 ], {|e| aadd( aHbp, e ) } ) - aeval( FilesToSources( aPrj[ PRJ_PRP_SOURCES, 2 ] ), {|e| aadd( aHbp, e ) } ) - - CreateTarget( cHbpPath, aHbp ) - - ::lDockBVisible := .t. - ::oDockB2:show() - - ::cProcessInfo := "" - - qStringList := QStringList():new() - qStringList:append( cHbpPath ) - - ::qProcess := QProcess():new() - ::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 /*----------------------------------------------------------------------*/ -METHOD HbIde:readProcessInfo( nMode, iBytes ) +METHOD HbIde:readProcessInfo( nMode ) LOCAL cLine DO CASE CASE nMode == 1 - ::cProcessInfo += ::qProcess:read( iBytes ) - ::oOutputResult:setData( ::cProcessInfo ) + CASE nMode == 2 - ::qProcess:setReadChannel( 0 ) // QProcess_StandardOutput ) - cLine := space( 1024 ) - //::qProcess:readLine( @cLine, 1024 ) - cLine := QByteArray():configure( ::qProcess:readAllStandardOutput() ):constData() + ::qProcess:setReadChannel( 0 ) + cLine := space( 4096 ) + ::qProcess:readLine( @cLine, 4096 ) IF !empty( cLine ) - ::cProcessInfo += CRLF + trim( cLine ) - //::oOutputResult:oWidget:append( '' + cLine + '' ) ::oOutputResult:oWidget:append( cLine ) ENDIF CASE nMode == 3 - ::qProcess:setReadChannel( 1 ) // QProcess_StandardError ) - cLine := space( 1024 ) - ::qProcess:readLine( @cLine, 1024 ) + ::qProcess:setReadChannel( 1 ) + cLine := space( 4096 ) + ::qProcess:readLine( @cLine, 4096 ) + IF !empty( cLine ) ::cProcessInfo += CRLF + trim( cLine ) IF ( "Warning" $ cLine ) @@ -1857,7 +1826,7 @@ METHOD HbIde:readProcessInfo( nMode, iBytes ) ELSEIF ( "Error" $ cLine ) cLine := '' + cLine + '' ENDIF - //::oOutputResult:oWidget:appendPlainText( cLine ) + ::oOutputResult:oWidget:append( cLine ) ENDIF diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg index c9fd6e139c..86550c3bd1 100644 --- a/harbour/contrib/hbide/ideactions.prg +++ b/harbour/contrib/hbide/ideactions.prg @@ -311,7 +311,7 @@ FUNCTION buildMainMenu( oWnd, oIde ) oMenuBar:addItem( { oSubMenu, NIL } ) oSubMenu := XbpMenu():new( oMenuBar ):create() - oSubMenu:title := "~CodePage" + oSubMenu:title := "~Codec" oSubMenu:addItem( { "Apple Roman " , {|| oIde:setCodec( "Apple Roman" ) } } ) oSubMenu:addItem( { "Big5 " , {|| oIde:setCodec( "Big5" ) } } ) oSubMenu:addItem( { "Big5-HKSCS " , {|| oIde:setCodec( "Big5-HKSCS" ) } } ) @@ -394,6 +394,7 @@ FUNCTION buildMainMenu( oWnd, oIde ) oSubMenu:addItem( { "WINSAMI2 " , {|| oIde:setCodec( "WINSAMI2" ) } } ) oMenuBar:addItem( { oSubMenu, NIL } ) + /* Tools */ oSubMenu := XbpMenu():new( oMenuBar ):create() oSubMenu:title := "~Tools" oSubMenu:addItem( { _T( "Configure Tools...*" ) , {|| oIde:executeAction( "" ) } } ) @@ -406,6 +407,13 @@ FUNCTION buildMainMenu( oWnd, oIde ) #endif oMenuBar:addItem( { oSubMenu, NIL } ) + /* Options */ + oSubMenu := XbpMenu():new( oMenuBar ):create() + oSubMenu:title := "~Options" + oSubMenu:addItem( { _T( "Themes" ) , {|| oIde:oThemes:fetch() } } ) + oMenuBar:addItem( { oSubMenu, NIL } ) + + /* Help */ oSubMenu := XbpMenu():new( oMenuBar ):create() oSubMenu:title := "~Help" oSubMenu:addItem( { _T( "About...*" ) , {|| oIde:executeAction( "" ) } } ) diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index 07eebbf715..529f7eb214 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -480,21 +480,21 @@ FUNCTION PathNormalized( cPath, lLower ) #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_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( ".*: 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_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.*" ) } ) + 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 aRegList @@ -613,16 +613,13 @@ FUNCTION ConvertBuildStatusMsgToHtml( cText, oWidget ) ENDDO aLines := hb_aTokens( cText, Chr( 10 ) ) - oWidget:insertHTML( cText ) - FOR EACH cLine IN aLines IF !Empty( cLine ) nPos := aScan( aRegList, {| reg | !Empty( hb_RegEx( reg[ 2 ], cLine ) ) } ) IF ( nPos > 0 ) - cLine := '' +; - cLine + '' + cLine := '' + cLine + '' End ENDIF @@ -646,90 +643,17 @@ FUNCTION FilesToSources( aFiles ) RETURN aSrc /*----------------------------------------------------------------------*/ -/* - * TODO: Load setting from user source - * Separate syntax highliters for different type of files. - */ -FUNCTION SetSyntaxHilighting( qEdit, qHiliter ) - LOCAL a_, b_, qFormat - HB_SYMBOL_UNUSED( qEdit ) +FUNCTION ParseKeyValPair( s, cKey, cVal ) + LOCAL n, lYes := .f. - /* Compiler Directives */ - b_:= { "include","ifdef","else","endif","command","xcommand","translate","xtranslate" } - a_:= {}; aeval( b_, {|e| aadd( a_, "#" + upper( e ) + "\b|#" + e + "\b" ) } ) - SetSyntaxAttrbs( qHiliter, a_, { 120, 26,213 }, .t., .t., .f. ) + IF ( n := at( "=", s ) ) > 0 + cKey := alltrim( substr( s, 1, n - 1 ) ) + cVal := alltrim( substr( s, n + 1 ) ) + lYes := ( !empty( cKey ) .and. !empty( cVal ) ) + ENDIF - /* Operators */ - a_:= { "\:\=|\:|\+|\-|\\|\*|\ IN\ |\ in\ |\=|\>|\<|\^|\%|\$|\&|\@|\.or\.|\.and\.|\.OR\.|\.AND\." } - SetSyntaxAttrbs( qHiliter, a_, { 255,120, 0 }, .f., .f., .f. ) - - /* Numerics */ - a_:= { "\b[0-9.]+\b" } - SetSyntaxAttrbs( qHiliter, a_, { 127,127,127 }, .f., .f., .f. ) - - /* Parenthesis and Braces */ - a_:= { "\(|\)|\{|\}|\[|\]|\|" } - SetSyntaxAttrbs( qHiliter, a_, { 255,127,200 }, .f., .f., .f. ) - - /* Harbour Keywords */ - b_:= { 'function','return','static','local', ; - 'if','else','elseif','endif','end', ; - 'docase','case','endcase','otherwise', ; - 'do','while','exit',; - 'for','each','next','step','to',; - 'class','endclass','method','data','var','destructor','inline','assign','access','inherit','init','create',; - 'begin','sequence','try','catch','always','recover','default','hb_symbol_unused' } - a_:= {}; aeval( b_, {|e| aadd( a_, "\b" + upper( e ) + "\b|\b" + e + "\b" ) } ) - SetSyntaxAttrbs( qHiliter, a_, { 40,120,240 }, .f., .t., .f. ) - - /* Functions in General */ - a_:= { "\b[A-Za-z0-9_]+(?=\()" } - SetSyntaxAttrbs( qHiliter, a_, { 128,0,64 }, .f., .f., .f. ) - - /* Strings */ - a_:= {} - aadd( a_, '\".*\"' ) - aadd( a_, "\'.*\'" ) - SetSyntaxAttrbs( qHiliter, a_, { 64,128,128 }, .f., .f., .f. ) - - /* Single Line Comments */ - a_:= { "//[^\n]*" } - SetSyntaxAttrbs( qHiliter, a_, { 255, 0, 0 }, .f., .f., .f. ) - - qFormat := QTextCharFormat():new() - qFormat:setFontItalic( .t. ) - qFormat:setForeGround( QBrush():new( "QColor", QColor():new( 190,190,190 ) ) ) - qHiliter:setHBMultiLineCommentFormat( qFormat ) - - RETURN nil - -/*----------------------------------------------------------------------*/ - -STATIC FUNCTION SetSyntaxAttrbs( qHiliter, aRegExp, aRGB, lItalic, lBold, lUnderline ) - LOCAL qStrList, qFormat - - qStrList := QStringList():new() - aeval( aRegExp, {|e| qStrList:append( e ) } ) - - qFormat := QTextCharFormat():new() - - IF hb_isLogical( lItalic ) - qFormat:setFontItalic( lItalic ) - ENDIF - IF hb_isLogical( lBold ) .and. lBold - qFormat:setFontWeight( 1000 ) - ENDIF - IF hb_isLogical( lUnderline ) - qFormat:setFontUnderline( lUnderline ) - ENDIF - IF hb_isArray( aRGB ) - qFormat:setForeGround( QBrush():new( "QColor", QColor():new( aRgb[ 1 ], aRgb[ 2 ], aRgb[ 3 ] ) ) ) - ENDIF - - qHiliter:setHBCompilerDirectives( qStrList, qFormat ) - - RETURN nil + RETURN ( lYes ) /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/idesaveload.prg b/harbour/contrib/hbide/idesaveload.prg index 331413e679..97d1b545a8 100644 --- a/harbour/contrib/hbide/idesaveload.prg +++ b/harbour/contrib/hbide/idesaveload.prg @@ -78,16 +78,17 @@ FUNCTION saveINI( oIde ) txt_:= {} // Properties aadd( txt_, "[HBIDE]" ) - aadd( txt_, "MainWindowGeometry = " + PosAndSize( oIde:oDlg:oWidget ) ) - aadd( txt_, "ProjectTreeVisible = " + IIF( oIde:lProjTreeVisible, "YES", "NO" ) ) - aadd( txt_, "ProjectTreeGeometry = " + PosAndSize( oIde:oProjTree:oWidget ) ) - aadd( txt_, "FunctionListVisible = " + IIF( oIde:lDockRVisible, "YES", "NO" ) ) - aadd( txt_, "FunctionListGeometry = " + PosAndSize( oIde:oFuncList:oWidget ) ) - aadd( txt_, "RecentTabIndex = " + hb_ntos( oIde:qTabWidget:currentIndex() ) ) - aadd( txt_, "CurrentProject = " + "" ) - aadd( txt_, "GotoDialogGeometry = " + oIde:aIni[ INI_HBIDE, GotoDialogGeometry ] ) - aadd( txt_, "PropsDialogGeometry = " + oIde:aIni[ INI_HBIDE, PropsDialogGeometry ] ) - aadd( txt_, "FindDialogGeometry = " + oIde:aIni[ INI_HBIDE, FindDialogGeometry ] ) + aadd( txt_, "MainWindowGeometry = " + PosAndSize( oIde:oDlg:oWidget ) ) + aadd( txt_, "ProjectTreeVisible = " + IIF( oIde:lProjTreeVisible, "YES", "NO" ) ) + aadd( txt_, "ProjectTreeGeometry = " + PosAndSize( oIde:oProjTree:oWidget ) ) + aadd( txt_, "FunctionListVisible = " + IIF( oIde:lDockRVisible, "YES", "NO" ) ) + aadd( txt_, "FunctionListGeometry = " + PosAndSize( oIde:oFuncList:oWidget ) ) + aadd( txt_, "RecentTabIndex = " + hb_ntos( oIde:qTabWidget:currentIndex() ) ) + aadd( txt_, "CurrentProject = " + "" ) + aadd( txt_, "GotoDialogGeometry = " + oIde:aIni[ INI_HBIDE, GotoDialogGeometry ] ) + aadd( txt_, "PropsDialogGeometry = " + oIde:aIni[ INI_HBIDE, PropsDialogGeometry ] ) + aadd( txt_, "FindDialogGeometry = " + oIde:aIni[ INI_HBIDE, FindDialogGeometry ] ) + aadd( txt_, "ThemesDialogGeometry = " + oIde:aIni[ INI_HBIDE, ThemesDialogGeometry ] ) qSet := QSettings():new( "Harbour", "HbIde" ) qSet:setValue( "state", oIde:oDlg:oWidget:saveState() ) @@ -152,7 +153,7 @@ FUNCTION loadINI( oIde, cHbideIni ) LOCAL aIdeEle := { "mainwindowgeometry" , "projecttreevisible" , "projecttreegeometry", ; "functionlistvisible", "functionlistgeometry", "recenttabindex" , ; "currentproject" , "gotodialoggeometry" , "propsdialoggeometry", ; - "finddialoggeometry" } + "finddialoggeometry" , "themesdialoggeometry" } DEFAULT cHbideIni TO "hbide.ini" diff --git a/harbour/contrib/hbide/idethemes.prg b/harbour/contrib/hbide/idethemes.prg new file mode 100644 index 0000000000..25dce1690d --- /dev/null +++ b/harbour/contrib/hbide/idethemes.prg @@ -0,0 +1,613 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * + * Copyright 2009 Pritpal Bedi + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/* + * EkOnkar + * ( The LORD is ONE ) + * + * Harbour-Qt IDE + * + * Pritpal Bedi + * 31Dec2009 + */ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ +/*----------------------------------------------------------------------*/ + +#include "common.ch" +#include "hbclass.ch" +#include "hbqt.ch" +#include "hbide.ch" + +/*----------------------------------------------------------------------*/ + +FUNCTION LoadThemes( oIde ) + + IF empty( oIde:cIniThemes ) + oIde:cIniThemes := hb_dirBase() + "projects" + hb_OsPathSeparator() + "hbide.thm" + ENDIF + + oIde:oThemes := IdeThemes():new( oIde, oIde:cIniThemes ):create() + + RETURN nil + +/*----------------------------------------------------------------------*/ + +CLASS IdeThemes + + VAR oIde + VAR lEdited INIT .f. + VAR cIniFile INIT "" + VAR ini_ INIT {} + VAR thm_ INIT {} + VAR hControls INIT hb_hash() + VAR hItems INIT hb_hash() + VAR oThemes + VAR oUI + + METHOD new() + METHOD create() + METHOD destroy() + METHOD load() + METHOD save() + METHOD fetch() + METHOD apply() + METHOD parse() + + ENDCLASS + +/*----------------------------------------------------------------------*/ + +METHOD IdeThemes:new( oIde, cIniFile ) + + ::oIde := oIde + ::cIniFile := cIniFile + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeThemes:create( oIde, cIniFile ) + + DEFAULT oIde TO ::oIde + DEFAULT cIniFile TO ::cIniFile + + ::oIde := oIde + ::cIniFile := cIniFile + + ::load( ::cIniFile ) + ::parse() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeThemes:destroy() + + IF !empty( ::oThemes ) + + ENDIF + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeThemes:load( cFile ) + + IF hb_isChar( cFile ) .AND. !empty( cFile ) .AND. file( cFile ) + ::ini_:= ReadSource( cFile ) + ENDIF + IF empty( ::ini_ ) + ::ini_:= LoadDefaultThemes() + ENDIF + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeThemes:save( lAs ) + + DEFAULT lAs TO .f. + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeThemes:fetch() + + IF empty( ::oUI ) + ::oUI := XbpQtUiLoader():new( ::oIde:oDlg ) + ::oUI:file := ::oIde:resPath + "themes.ui" + ::oUI:create() + ::oUI:setWindowFlags( Qt_Sheet ) + + ::oUI:signal( "buttonClose", "clicked()", ; + {|| ::oIde:aIni[ INI_HBIDE, ThemesDialogGeometry ] := PosAndSize( ::oUI:oWidget ), ::oUI:hide() } ) + + ::oIde:setPosByIni( ::oUI:oWidget, ThemesDialogGeometry ) + + /* Insert Themes */ + aeval( ::thm_ , {|e| ::oUI:qObj[ "comboThemes" ]:addItem( e[ 1 ] ) } ) + hb_heval( ::hItems, {|e| ::oUI:qObj[ "comboItems" ]:addItem( e ) } ) + + ENDIF + + ::oUI:show() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeThemes:apply() + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeThemes:parse() + LOCAL s, n, cKey, cVal, nPart, nTheme, hTheme + + IF empty( ::ini_ ) + RETURN Self + ENDIF + + FOR EACH s IN ::ini_ + IF !empty( s := alltrim( s ) ) .and. !left( s, 1 ) == "#" /* Comment */ + DO case + CASE s == "[ Controls ]" + nPart := 1 + CASE s == "[ Items ]" + nPart := 2 + CASE left( s, 7 ) == "[ Theme" + IF ( n := at( ":", s ) ) > 0 + cKey := alltrim( strtran( substr( s, n+1 ), "]" ) ) + ENDIF + HB_TRACE( HB_TR_ALWAYS, cKey ) + IF !empty( cKey ) + nPart := 3 + IF ( nTheme := ascan( ::thm_, {|e_| e_[ 1 ] == cKey } ) ) == 0 + aadd( ::thm_, { cKey, hb_hash() } ) + nTheme := len( ::thm_ ) + ENDIF + ELSE + nPart := 0 + nTheme := 0 + ENDIF + OTHERWISE + DO CASE + CASE nPart == 1 /* Controls */ + IF ParseKeyValPair( s, @cKey, @cVal ) + ::hControls[ cKey ] := cVal + ENDIF + CASE nPart == 2 /* Items */ + IF ParseKeyValPair( s, @cKey, @cVal ) + ::hItems[ cKey ] := cVal + ENDIF + CASE nPart == 3 /* Themes */ + hTheme := ::thm_[ nTheme, 2 ] + IF ParseKeyValPair( s, @cKey, @cVal ) + hTheme[ cKey ] := cVal + ENDIF + ENDCASE + ENDCASE + ENDIF + NEXT + + RETURN Self + +/*----------------------------------------------------------------------*/ + +FUNCTION SetSyntaxHilighting( qEdit, qHiliter ) + LOCAL a_, b_, qFormat + + HB_SYMBOL_UNUSED( qEdit ) + + /* Compiler Directives */ + b_:= { "include","ifdef","else","endif","command","xcommand","translate","xtranslate" } + a_:= {}; aeval( b_, {|e| aadd( a_, "#" + upper( e ) + "\b|#" + e + "\b" ) } ) + SetSyntaxAttrbs( qHiliter, a_, { 120, 26,213 }, .t., .t., .f. ) + + /* Operators */ + a_:= { "\:\=|\:|\+|\-|\\|\*|\ IN\ |\ in\ |\=|\>|\<|\^|\%|\$|\&|\@|\.or\.|\.and\.|\.OR\.|\.AND\." } + SetSyntaxAttrbs( qHiliter, a_, { 255,120, 0 }, .f., .f., .f. ) + + /* Numerics */ + a_:= { "\b[0-9.]+\b" } + SetSyntaxAttrbs( qHiliter, a_, { 127,127,127 }, .f., .f., .f. ) + + /* Parenthesis and Braces */ + a_:= { "\(|\)|\{|\}|\[|\]|\|" } + SetSyntaxAttrbs( qHiliter, a_, { 255,127,200 }, .f., .f., .f. ) + + /* Harbour Keywords */ + b_:= { 'function','return','static','local', ; + 'if','else','elseif','endif','end', ; + 'docase','case','endcase','otherwise', ; + 'do','while','exit',; + 'for','each','next','step','to',; + 'class','endclass','method','data','var','destructor','inline','assign','access','inherit','init','create',; + 'begin','sequence','try','catch','always','recover','default','hb_symbol_unused' } + a_:= {}; aeval( b_, {|e| aadd( a_, "\b" + upper( e ) + "\b|\b" + e + "\b" ) } ) + SetSyntaxAttrbs( qHiliter, a_, { 40,120,240 }, .f., .t., .f. ) + + /* Functions in General */ + a_:= { "\b[A-Za-z0-9_]+(?=\()" } + SetSyntaxAttrbs( qHiliter, a_, { 128,0,64 }, .f., .f., .f. ) + + /* Strings */ + a_:= {} + aadd( a_, '\".*\"' ) + aadd( a_, "\'.*\'" ) + SetSyntaxAttrbs( qHiliter, a_, { 64,128,128 }, .f., .f., .f. ) + + /* Single Line Comments */ + a_:= { "//[^\n]*" } + SetSyntaxAttrbs( qHiliter, a_, { 190,190,190 }, .f., .f., .f. ) + + qFormat := QTextCharFormat():new() + qFormat:setFontItalic( .t. ) + qFormat:setForeGround( QBrush():new( "QColor", QColor():new( 190,190,190 ) ) ) + qHiliter:setHBMultiLineCommentFormat( qFormat ) + + RETURN nil + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION SetSyntaxAttrbs( qHiliter, aRegExp, aRGB, lItalic, lBold, lUnderline ) + LOCAL qStrList, qFormat + + qStrList := QStringList():new() + aeval( aRegExp, {|e| qStrList:append( e ) } ) + + qFormat := QTextCharFormat():new() + + IF hb_isLogical( lItalic ) + qFormat:setFontItalic( lItalic ) + ENDIF + IF hb_isLogical( lBold ) .and. lBold + qFormat:setFontWeight( 1000 ) + ENDIF + IF hb_isLogical( lUnderline ) + qFormat:setFontUnderline( lUnderline ) + ENDIF + IF hb_isArray( aRGB ) + qFormat:setForeGround( QBrush():new( "QColor", QColor():new( aRgb[ 1 ], aRgb[ 2 ], aRgb[ 3 ] ) ) ) + ENDIF + + qHiliter:setHBCompilerDirectives( qStrList, qFormat ) + + RETURN nil + +/*----------------------------------------------------------------------*/ + +STATIC FUNCTION LoadDefaultThemes() + LOCAL ini_:= {} + + IF .t. + aadd( ini_, "[ Controls ] " ) + aadd( ini_, " " ) + aadd( ini_, "Dialog_Title = HBIDE - Source Syntax Highlighting " ) + aadd( ini_, "Label_Items = Items " ) + aadd( ini_, "Label_Theme = Theme " ) + aadd( ini_, "Label_Color = Color " ) + aadd( ini_, "Check_Italic = Italic " ) + aadd( ini_, "Check_Bold = Bold " ) + aadd( ini_, "Check_Underline = Underline " ) + aadd( ini_, "Button_Text_Save = Save " ) + aadd( ini_, "Button_Text_SaveAs = Save As " ) + aadd( ini_, "Button_Text_Apply = Apply " ) + aadd( ini_, "Button_Text_Close = Close " ) + aadd( ini_, " " ) + aadd( ini_, "[ Items ] " ) + aadd( ini_, " " ) + aadd( ini_, "Background = Background " ) + aadd( ini_, "BookMarkLineBackground = Bookmark Line Background " ) + aadd( ini_, "BracketsAndBraces = Brackets and Braces " ) + aadd( ini_, "CommentsAndRemarks = Comments and Remarks " ) + aadd( ini_, "NumericalConstants = Numerical Constants " ) + aadd( ini_, "Operators = Operators " ) + aadd( ini_, "PreprocessorDirectives = Preprocessor Directives " ) + aadd( ini_, "SelectionBackground = Selected Text Background " ) + aadd( ini_, "TerminatedStringConstants = Terminated String Constants " ) + aadd( ini_, "UnrecognizedText = Unrecognized Text " ) + aadd( ini_, "UnterminatedStrings = Unterminated Strings " ) + aadd( ini_, "CurrentLineBackColor = Current Line Background " ) + aadd( ini_, "FunctionsNotInDictionaries = Functions not in Dictionaries " ) + aadd( ini_, "ConstantsDictionary = Constants Dictionary " ) + aadd( ini_, "WAPIDictionary = WAPI Dictionary " ) + aadd( ini_, "HashDictionary = Hash Dictionary " ) + aadd( ini_, "CLanguageDictionary = C-CPP Language Dictionary " ) + aadd( ini_, "UserDictionary = User Dictionary " ) + aadd( ini_, " " ) + aadd( ini_, " " ) + aadd( ini_, "[ Theme : Classic ] " ) + aadd( ini_, " " ) + aadd( ini_, "Background = 255,255,255 , No, No, No, " ) + aadd( ini_, "BookMarkLineBackground = 0,255,255 , No, No, No, " ) + aadd( ini_, "BracketsAndBraces = 64,0,0 , No, No, No, " ) + aadd( ini_, "CommentsAndRemarks = 0,128,255 , No, No, No, " ) + aadd( ini_, "NumericalConstants = 0,128,0 , No, No, No, " ) + aadd( ini_, "Operators = 0,0,0 , No, No, No, " ) + aadd( ini_, "PreprocessorDirectives = 128,128,0 , No, No, No, " ) + aadd( ini_, "SelectionBackground = 255,128,255 , No, No, No, " ) + aadd( ini_, "TerminatedStringConstants = 255,0,0 , No, No, No, " ) + aadd( ini_, "UnrecognizedText = 0,0,0 , No, No, No, " ) + aadd( ini_, "UnterminatedStrings = 255,128,128 , No, No, No, " ) + aadd( ini_, "CurrentLineBackColor = 128,0,0 , No, No, No, " ) + aadd( ini_, "FunctionsNotInDictionaries = 0,0,192 , No, No, No, " ) + aadd( ini_, "ConstantsDictionary = 128,0,128 , No, No, No, " ) + aadd( ini_, "WAPIDictionary = 0,0,128 , No, No, No, " ) + aadd( ini_, "HashDictionary = 255,255,255 , No, No, No, " ) + aadd( ini_, "CLanguageDictionary = 0,0,128 , No, No, No, " ) + aadd( ini_, "UserDictionary = 0,0,0 , No, No, No, " ) + aadd( ini_, " " ) + aadd( ini_, " " ) + aadd( ini_, "[ Theme : City Lights ] " ) + aadd( ini_, " " ) + aadd( ini_, "Background = 0,0,0 , No, No, No, " ) + aadd( ini_, "BookMarkLineBackground = 128,128,128 , No, No, No, " ) + aadd( ini_, "BracketsAndBraces = 255,128,128 , No, No, No, " ) + aadd( ini_, "CommentsAndRemarks = 255,255,0 , No, No, No, " ) + aadd( ini_, "NumericalConstants = 0,255,255 , No, No, No, " ) + aadd( ini_, "Operators = 128,255,0 , No, No, No, " ) + aadd( ini_, "PreprocessorDirectives = 255,0,0 , No, No, No, " ) + aadd( ini_, "SelectionBackground = 255,128,255 , No, No, No, " ) + aadd( ini_, "TerminatedStringConstants = 0,255,0 , No, No, No, " ) + aadd( ini_, "UnrecognizedText = 255,255,255 , No, No, No, " ) + aadd( ini_, "UnterminatedStrings = 255,255,255 , No, No, No, " ) + aadd( ini_, "CurrentLineBackColor = 0,0,255 , No, No, No, " ) + aadd( ini_, "FunctionsNotInDictionaries = 0,0,192 , No, No, No, " ) + aadd( ini_, "ConstantsDictionary = 128,0,128 , No, No, No, " ) + aadd( ini_, "WAPIDictionary = 0,0,128 , No, No, No, " ) + aadd( ini_, "HashDictionary = 0,0,0 , No, No, No, " ) + aadd( ini_, "CLanguageDictionary = 0,0,128 , No, No, No, " ) + aadd( ini_, "UserDictionary = 0,0,0 , No, No, No, " ) + aadd( ini_, " " ) + aadd( ini_, " " ) + aadd( ini_, "[ Theme : Evening Glamour ] " ) + aadd( ini_, " " ) + aadd( ini_, "Background = 0,64,128 , No, No, No, " ) + aadd( ini_, "BookMarkLineBackground = 128,0,255 , No, No, No, " ) + aadd( ini_, "BracketsAndBraces = 128,255,255 , No, No, No, " ) + aadd( ini_, "CommentsAndRemarks = 192,192,192 , No, No, No, " ) + aadd( ini_, "NumericalConstants = 0,255,0 , No, No, No, " ) + aadd( ini_, "Operators = 255,255,255 , No, No, No, " ) + aadd( ini_, "PreprocessorDirectives = 255,128,192 , No, No, No, " ) + aadd( ini_, "SelectionBackground = 0,128,255 , No, No, No, " ) + aadd( ini_, "TerminatedStringConstants = 255,255,128 , No, No, No, " ) + aadd( ini_, "UnrecognizedText = 255,255,255 , No, No, No, " ) + aadd( ini_, "UnterminatedStrings = 255,128,64 , No, No, No, " ) + aadd( ini_, "CurrentLineBackColor = 128,255,255 , No, No, No, " ) + aadd( ini_, "FunctionsNotInDictionaries = 128,255,128 , No, No, No, " ) + aadd( ini_, "ConstantsDictionary = 255,128,192 , No, No, No, " ) + aadd( ini_, "WAPIDictionary = 128,128,64 , No, No, No, " ) + aadd( ini_, "HashDictionary = 0,64,128 , No, No, No, " ) + aadd( ini_, "CLanguageDictionary = 0,0,128 , No, No, No, " ) + aadd( ini_, "UserDictionary = 0,0,0 , No, No, No, " ) + aadd( ini_, " " ) + aadd( ini_, " " ) + aadd( ini_, "[ Theme : Sand Storm ] " ) + aadd( ini_, " " ) + aadd( ini_, "Background = 255,255,192 , No, No, No, " ) + aadd( ini_, "BookMarkLineBackground = 0,255,255 , No, No, No, " ) + aadd( ini_, "BracketsAndBraces = 0,0,0 , No, No, No, " ) + aadd( ini_, "CommentsAndRemarks = 128,128,128 , No, No, No, " ) + aadd( ini_, "NumericalConstants = 0,128,128 , No, No, No, " ) + aadd( ini_, "Operators = 0,0,0 , No, No, No, " ) + aadd( ini_, "PreprocessorDirectives = 255,0,0 , No, No, No, " ) + aadd( ini_, "SelectionBackground = 255,0,255 , No, No, No, " ) + aadd( ini_, "TerminatedStringConstants = 0,128,0 , No, No, No, " ) + aadd( ini_, "UnrecognizedText = 0,0,0 , No, No, No, " ) + aadd( ini_, "UnterminatedStrings = 128,128,0 , No, No, No, " ) + aadd( ini_, "CurrentLineBackColor = 128,0,0 , No, No, No, " ) + aadd( ini_, "FunctionsNotInDictionaries = 0,0,192 , No, No, No, " ) + aadd( ini_, "ConstantsDictionary = 128,0,128 , No, No, No, " ) + aadd( ini_, "WAPIDictionary = 0,0,128 , No, No, No, " ) + aadd( ini_, "HashDictionary = 255,255,192 , No, No, No, " ) + aadd( ini_, "CLanguageDictionary = 0,0,128 , No, No, No, " ) + aadd( ini_, "UserDictionary = 0,0,0 , No, No, No, " ) + // + aadd( ini_, " " ) + ENDIF + RETURN ini_ + +/*----------------------------------------------------------------------*/ +#if 0 + [Classic] [CityLights] [Evening] [SandStorm] + +Background = 255,255,255 0,0,0 0,64,128 255,255,192 +BookMarkLineBackground = 0,255,255 128,128,128 128,0,255 0,255,255 +BracketsAndBraces = 64,0,0 255,128,128 128,255,255 0,0,0 +CommentsAndRemarks = 0,128,255 255,255,0 192,192,192 128,128,128 +NumericalConstants = 0,128,0 0,255,255 0,255,0 0,128,128 +Operators = 0,0,0 128,255,0 255,255,255 0,0,0 +PreprocessorDirectives = 128,128,0 255,0,0 255,128,192 255,0,0 +SelectionBackground = 255,128,255 255,128,255 0,128,255 255,0,255 +TerminatedStringConstants = 255,0,0 0,255,0 255,255,128 0,128,0 +UnrecognizedText = 0,0,0 255,255,255 255,255,255 0,0,0 +UnterminatedStrings = 255,128,128 255,255,255 255,128,64 128,128,0 +CurrentLineBackColor = 128,0,0 0,0,255 128,255,255 128,0,0 +FunctionsNotInDictionaries = 0,0,192 0,0,192 128,255,128 0,0,192 +ConstantsDictionary = 128,0,128 128,0,128 255,128,192 128,0,128 +WAPIDictionary = 0,0,128 0,0,128 128,128,64 0,0,128 +HashDictionary = 255,255,255 0,0,0 0,64,128 255,255,192 +CLanguageDictionary = 0,0,128 0,0,128 0,0,128 0,0,128 +UserDictionary = 0,0,0 0,0,0 0,0,0 0,0,0 + + +[Controls] + +Dialog_Title = HBIDE - Source Syntax Highlighting +Label_Items = Items +Label_Theme = Theme +Label_Color = Color +Check_Italic = Italic +Check_Bold = Bold +Check_Underline = Underline +Button_Text_Save = Save +Button_Text_SaveAs = Save As +Button_Text_Apply = Apply +Button_Text_Cancel = Cancel + +[Items] + +Background = Background +BookMarkLineBackground = Bookmark Line Background +BracketsAndBraces = Brackets and Braces +CommentsAndRemarks = Comments and Remarks +NumericalConstants = Numerical Constants +Operators = Operators +PreprocessorDirectives = Preprocessor Directives +SelectionBackground = Selected Text Background +TerminatedStringConstants = Terminated String Constants +UnrecognizedText = Unrecognized Text +UnterminatedStrings = Unterminated Strings +CurrentLineBackColor = Current Line Background +FunctionsNotInDictionaries = Functions not in Dictionaries +ConstantsDictionary = Constants Dictionary +WAPIDictionary = WAPI Dictionary +HashDictionary = Hash Dictionary +CLanguageDictionary = C-CPP Language Dictionary +UserDictionary = User Dictionary + + +[Theme : Classic] + +Background = 255,255,255 , No, No, No, +BookMarkLineBackground = 0,255,255 , No, No, No, +BracketsAndBraces = 64,0,0 , No, No, No, +CommentsAndRemarks = 0,128,255 , No, No, No, +NumericalConstants = 0,128,0 , No, No, No, +Operators = 0,0,0 , No, No, No, +PreprocessorDirectives = 128,128,0 , No, No, No, +SelectionBackground = 255,128,255 , No, No, No, +TerminatedStringConstants = 255,0,0 , No, No, No, +UnrecognizedText = 0,0,0 , No, No, No, +UnterminatedStrings = 255,128,128 , No, No, No, +CurrentLineBackColor = 128,0,0 , No, No, No, +FunctionsNotInDictionaries = 0,0,192 , No, No, No, +ConstantsDictionary = 128,0,128 , No, No, No, +WAPIDictionary = 0,0,128 , No, No, No, +HashDictionary = 255,255,255 , No, No, No, +CLanguageDictionary = 0,0,128 , No, No, No, +UserDictionary = 0,0,0 , No, No, No, + + +[Theme : City Lights] + +Background = 0,0,0 , No, No, No, +BookMarkLineBackground = 128,128,128 , No, No, No, +BracketsAndBraces = 255,128,128 , No, No, No, +CommentsAndRemarks = 255,255,0 , No, No, No, +NumericalConstants = 0,255,255 , No, No, No, +Operators = 128,255,0 , No, No, No, +PreprocessorDirectives = 255,0,0 , No, No, No, +SelectionBackground = 255,128,255 , No, No, No, +TerminatedStringConstants = 0,255,0 , No, No, No, +UnrecognizedText = 255,255,255 , No, No, No, +UnterminatedStrings = 255,255,255 , No, No, No, +CurrentLineBackColor = 0,0,255 , No, No, No, +FunctionsNotInDictionaries = 0,0,192 , No, No, No, +ConstantsDictionary = 128,0,128 , No, No, No, +WAPIDictionary = 0,0,128 , No, No, No, +HashDictionary = 0,0,0 , No, No, No, +CLanguageDictionary = 0,0,128 , No, No, No, +UserDictionary = 0,0,0 , No, No, No, + + +[Theme : Evening Glamour] + +Background = 0,64,128 , No, No, No, +BookMarkLineBackground = 128,0,255 , No, No, No, +BracketsAndBraces = 128,255,255 , No, No, No, +CommentsAndRemarks = 192,192,192 , No, No, No, +NumericalConstants = 0,255,0 , No, No, No, +Operators = 255,255,255 , No, No, No, +PreprocessorDirectives = 255,128,192 , No, No, No, +SelectionBackground = 0,128,255 , No, No, No, +TerminatedStringConstants = 255,255,128 , No, No, No, +UnrecognizedText = 255,255,255 , No, No, No, +UnterminatedStrings = 255,128,64 , No, No, No, +CurrentLineBackColor = 128,255,255 , No, No, No, +FunctionsNotInDictionaries = 128,255,128 , No, No, No, +ConstantsDictionary = 255,128,192 , No, No, No, +WAPIDictionary = 128,128,64 , No, No, No, +HashDictionary = 0,64,128 , No, No, No, +CLanguageDictionary = 0,0,128 , No, No, No, +UserDictionary = 0,0,0 , No, No, No, + + +[Theme : Sand Storm] + +Background = 255,255,192 , No, No, No, +BookMarkLineBackground = 0,255,255 , No, No, No, +BracketsAndBraces = 0,0,0 , No, No, No, +CommentsAndRemarks = 128,128,128 , No, No, No, +NumericalConstants = 0,128,128 , No, No, No, +Operators = 0,0,0 , No, No, No, +PreprocessorDirectives = 255,0,0 , No, No, No, +SelectionBackground = 255,0,255 , No, No, No, +TerminatedStringConstants = 0,128,0 , No, No, No, +UnrecognizedText = 0,0,0 , No, No, No, +UnterminatedStrings = 128,128,0 , No, No, No, +CurrentLineBackColor = 128,0,0 , No, No, No, +FunctionsNotInDictionaries = 0,0,192 , No, No, No, +ConstantsDictionary = 128,0,128 , No, No, No, +WAPIDictionary = 0,0,128 , No, No, No, +HashDictionary = 255,255,192 , No, No, No, +CLanguageDictionary = 0,0,128 , No, No, No, +UserDictionary = 0,0,0 , No, No, No, + +#endif + +/*----------------------------------------------------------------------*/ + diff --git a/harbour/contrib/hbide/resources/themes.ui b/harbour/contrib/hbide/resources/themes.ui index e261fab900..e9c0eba985 100644 --- a/harbour/contrib/hbide/resources/themes.ui +++ b/harbour/contrib/hbide/resources/themes.ui @@ -1,7 +1,7 @@ - Dialog - + dialogThemes + 0 @@ -11,7 +11,7 @@ - Dialog + HBIDE - Source Syntax Highlighting @@ -23,7 +23,7 @@ - + 12 @@ -36,7 +36,7 @@ Item - + 12 @@ -49,7 +49,7 @@ Theme - + 64 @@ -59,7 +59,7 @@ - + 308 @@ -72,7 +72,7 @@ Color - + 64 @@ -82,11 +82,11 @@ - + 12 - 340 + 344 75 23 @@ -95,11 +95,11 @@ Save - + 112 - 340 + 344 75 23 @@ -108,11 +108,11 @@ Save As - + 212 - 340 + 344 75 23 @@ -121,20 +121,20 @@ Apply - + 308 - 340 + 344 75 23 - Cancel + Close - + 64 @@ -147,7 +147,7 @@ Italic - + 144 @@ -160,7 +160,7 @@ Bold - + 216 @@ -173,6 +173,19 @@ Underline + + + + 0 + 324 + 397 + 16 + + + + Qt::Horizontal + +