From 0ad0574bbf10478dae59bf104de0a654e0e3855b Mon Sep 17 00:00:00 2001 From: Pritpal Bedi Date: Wed, 17 Feb 2010 02:38:41 +0000 Subject: [PATCH] 2010-02-16 18:31 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + contrib/hbide/resources/cutb16.png + contrib/hbide/resources/dbl2sglquote.png + contrib/hbide/resources/decreaseindent.png + contrib/hbide/resources/down16.png + contrib/hbide/resources/increaseindent.png + contrib/hbide/resources/sgl2dblquote.png + contrib/hbide/resources/up16.png * contrib/hbide/idedocks.prg + Implemented left-side toolbar containing available panels distinguished by suble color change. Click on one will bring forward the relevant tabs-panel. Tooltip describes which panel it is. + Implemented left-side another toolbar underneath above one giving access to line and block actions. ;NOTE: Please test and forward suggessions. ;REQUEST: Can someone provide relevant .png's to these actions ? I am really poor in drafting something meaningful. --- harbour/ChangeLog | 21 ++ harbour/contrib/hbide/idedocks.prg | 263 ++++++++++++------ harbour/contrib/hbide/resources/cutb16.png | Bin 0 -> 982 bytes .../contrib/hbide/resources/dbl2sglquote.png | Bin 0 -> 135 bytes .../hbide/resources/decreaseindent.png | Bin 0 -> 174 bytes harbour/contrib/hbide/resources/down16.png | Bin 0 -> 884 bytes .../hbide/resources/increaseindent.png | Bin 0 -> 170 bytes .../contrib/hbide/resources/sgl2dblquote.png | Bin 0 -> 158 bytes harbour/contrib/hbide/resources/up16.png | Bin 0 -> 914 bytes 9 files changed, 206 insertions(+), 78 deletions(-) create mode 100644 harbour/contrib/hbide/resources/cutb16.png create mode 100644 harbour/contrib/hbide/resources/dbl2sglquote.png create mode 100644 harbour/contrib/hbide/resources/decreaseindent.png create mode 100644 harbour/contrib/hbide/resources/down16.png create mode 100644 harbour/contrib/hbide/resources/increaseindent.png create mode 100644 harbour/contrib/hbide/resources/sgl2dblquote.png create mode 100644 harbour/contrib/hbide/resources/up16.png diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 2bcf5c5047..82672f2f88 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,27 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-02-16 18:31 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com) + + contrib/hbide/resources/cutb16.png + + contrib/hbide/resources/dbl2sglquote.png + + contrib/hbide/resources/decreaseindent.png + + contrib/hbide/resources/down16.png + + contrib/hbide/resources/increaseindent.png + + contrib/hbide/resources/sgl2dblquote.png + + contrib/hbide/resources/up16.png + + * contrib/hbide/idedocks.prg + + Implemented left-side toolbar containing available panels + distinguished by suble color change. Click on one will + bring forward the relevant tabs-panel. Tooltip describes + which panel it is. + + Implemented left-side another toolbar underneath above one + giving access to line and block actions. + + ;NOTE: Please test and forward suggessions. + ;REQUEST: Can someone provide relevant .png's to these actions ? + I am really poor in drafting something meaningful. + 2010-02-17 03:23 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbwin/legacycd.c ! Fixed GETPROCADDRESS() for WinCE after recent changes. diff --git a/harbour/contrib/hbide/idedocks.prg b/harbour/contrib/hbide/idedocks.prg index bccfd11dbb..dd98b3f4a7 100644 --- a/harbour/contrib/hbide/idedocks.prg +++ b/harbour/contrib/hbide/idedocks.prg @@ -75,6 +75,8 @@ CLASS IdeDocks INHERIT IdeObject DATA nPass INIT 0 + DATA aPanels INIT {} + DATA aBtnLines INIT {} METHOD new( oIde ) METHOD create( oIde ) @@ -104,6 +106,8 @@ CLASS IdeDocks INHERIT IdeObject METHOD getMarkWidget( nIndex ) METHOD dispEnvironment( cEnviron ) METHOD execSkeleton( nMode, p ) + METHOD addPanelButton( cPanel ) + METHOD disblePanelButton( qTBtn ) ENDCLASS @@ -129,6 +133,7 @@ METHOD IdeDocks:create( oIde ) METHOD IdeDocks:destroy() LOCAL oUI := ::oIde:oSkeltnUI + LOCAL qTBtn ::disconnect( oUI:q_buttonNew , "clicked()" ) ::disconnect( oUI:q_buttonRename, "clicked()" ) @@ -142,47 +147,35 @@ METHOD IdeDocks:destroy() /* Initiate more destructors */ + FOR EACH qTBtn IN ::aPanels + ::disconnect( qTBtn, "clicked()" ) + qTBtn := NIL + NEXT + + RETURN Self /*----------------------------------------------------------------------*/ -METHOD IdeDocks:setView( cView ) - LOCAL n +METHOD IdeDocks:buildDockWidgets() - SWITCH cView + ::buildToolBarPanels() - CASE "New..." - cView := hbide_fetchAString( ::qViewsCombo, cView, "Name the View", "New View" ) - IF cView != "New..." - IF ascan( ::aINI[ INI_VIEWS ], {|e| e == cView } ) > 0 - MsgBox( "View: " + cView + ", already exists" ) - ELSE - aadd( ::aINI[ INI_VIEWS ], cView ) - ::qViewsCombo:addItem( cView ) - ::buildViewWidget() - ::oStackedWidget:oWidget:setCurrentIndex( len( ::aINI[ INI_VIEWS ] ) ) - ::oIde:cWrkView := cView - ENDIF - ENDIF - EXIT + ::buildProjectTree() + ::buildEditorTree() + ::buildFuncList() + ::buildCompileResults() + ::buildLinkResults() + ::buildOutputResults() + ::buildHelpWidget() + ::buildSkeletonWidget() - CASE "Main" - ::oIde:nCurView := 0 - ::oIde:qTabWidget := ::aViews[ ::nCurView + 1 ]:oTabWidget:oWidget - ::oIde:oTabParent := ::aViews[ ::nCurView + 1 ] - ::oStackedWidget:oWidget:setCurrentIndex( 0 ) - ::oIde:cWrkView := "Main" - EXIT +* ::buildFindInFiles() - OTHERWISE - IF ( n := ascan( ::aINI[ INI_VIEWS ], cView ) ) > 0 - ::oStackedWidget:oWidget:setCurrentIndex( n ) /* Note: n is always base of zero as main == 1 */ - ::oIde:cWrkView := cView - ENDIF - EXIT - ENDSWITCH + ::oDlg:oWidget:tabifyDockWidget( ::oDockB:oWidget , ::oDockB1:oWidget ) + ::oDlg:oWidget:tabifyDockWidget( ::oDockB1:oWidget, ::oDockB2:oWidget ) - RETURN NIL + RETURN Self /*----------------------------------------------------------------------*/ @@ -323,42 +316,127 @@ METHOD IdeDocks:buildViewWidget() /*----------------------------------------------------------------------*/ -METHOD IdeDocks:buildDockWidgets() +METHOD IdeDocks:setView( cView ) + LOCAL n - ::buildToolBarPanels() + SWITCH cView - ::buildProjectTree() - ::buildEditorTree() - ::buildFuncList() - ::buildCompileResults() - ::buildLinkResults() - ::buildOutputResults() - ::buildHelpWidget() - ::buildSkeletonWidget() + CASE "New..." + cView := hbide_fetchAString( ::qViewsCombo, cView, "Name the View", "New View" ) + IF cView != "New..." + IF ascan( ::aINI[ INI_VIEWS ], {|e| e == cView } ) > 0 + MsgBox( "View: " + cView + ", already exists" ) + ELSE + aadd( ::aINI[ INI_VIEWS ], cView ) + ::qViewsCombo:addItem( cView ) + ::buildViewWidget() + ::oStackedWidget:oWidget:setCurrentIndex( len( ::aINI[ INI_VIEWS ] ) ) + ::oIde:cWrkView := cView + ENDIF + ENDIF + EXIT -* ::buildFindInFiles() + CASE "Main" + ::oIde:nCurView := 0 + ::oIde:qTabWidget := ::aViews[ ::nCurView + 1 ]:oTabWidget:oWidget + ::oIde:oTabParent := ::aViews[ ::nCurView + 1 ] + ::oStackedWidget:oWidget:setCurrentIndex( 0 ) + ::oIde:cWrkView := "Main" + EXIT - ::oDlg:oWidget:tabifyDockWidget( ::oDockB:oWidget , ::oDockB1:oWidget ) - ::oDlg:oWidget:tabifyDockWidget( ::oDockB1:oWidget, ::oDockB2:oWidget ) + OTHERWISE + IF ( n := ascan( ::aINI[ INI_VIEWS ], cView ) ) > 0 + ::oStackedWidget:oWidget:setCurrentIndex( n ) /* Note: n is always base of zero as main == 1 */ + ::oIde:cWrkView := cView + ENDIF + EXIT + ENDSWITCH + + RETURN NIL + +/*----------------------------------------------------------------------*/ + +METHOD IdeDocks:disblePanelButton( qTBtn ) + LOCAL q + + FOR EACH q IN ::aPanels + q:setEnabled( !( q == qTBtn ) ) + NEXT + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeDocks:addPanelButton( cPanel ) + LOCAL qTBtn, aColors, nIndex + #if 0 /* Royal Blue */ + aColors := { ; + "#000073" , ; + "#000080" , ; + "#19198D" , ; + "#333399" , ; + "#4D4DA6" , ; + "#6666B3" , ; + "#8080C0" , ; + "#9999CC" , ; + "#B2B2D9" , ; + "#CCCCE6" , ; + "#E6E6F2" ; + } + #endif + #if 0 /* Turquish */ + aColors := { ; + "#009999" , ; + "#19A3A3" , ; + "#33ADAD" , ; + "#4DB8B8" , ; + "#66C2C2" , ; + "#80CCCC" , ; + "#99D6D6" , ; + "#B2E0E0" , ; + "#CCEBEB" , ; + "#E6F5F5" ; + } + #endif + + aColors := { ; + "#996633" , ; + "#A37547" , ; + "#AD855C" , ; + "#B89470" , ; + "#C2A385" , ; + "#CCB299" , ; + "#D6C2AD" , ; + "#E0D1C2" , ; + "#EBE0D6" , ; + "#F5F0EB" ; + } + + + IF cPanel == "Main" + nIndex := 0 + ELSE + nIndex := len( ::aPanels ) - 1 + ENDIF + + qTBtn := QToolButton():new() + qTBtn:setMaximumHeight( 12 ) + qTBtn:setMaximumWidth( 18 ) + qTBtn:setTooltip( "Panel: " + cPanel ) + qTBtn:setStyleSheet( "background-color: " + aColors[ nIndex + 1 ] + " ;" ) + + ::connect( qTBtn, "clicked()", {|| ::disblePanelButton( qTBtn ), ::setView( cPanel ) } ) + ::qTBarPanels:addWidget( qTBtn ) + + aadd( ::aPanels, qTBtn ) RETURN Self /*----------------------------------------------------------------------*/ METHOD IdeDocks:buildToolBarPanels() - LOCAL qAct, i, s, qSize, qA - #if 0 - LOCAL aColors := { "rgb( 0,0,212 )" , "rgb( 0,0,255 )" , "rgb( 40,40,255 )", ; - "rgb( 80,80,255 )", "rgb( 120,120,255 )", "rgb( 160,160,255 )" } - #else - //LOCAL aColors := { "rgb(128,64,64)","rgb(128,0,0)","rgb(255,128,64)","rgb(128,128,64)","rgb(255,128,128)","rgb(225,128,0)" } - LOCAL aColors := { "rgb(255,128,64)","rgb(225,225,0)" ,"rgb(0,128,128)",; - "rgb(190,115,65)","rgb(80,175,120)","rgb(17,122,238)" } - #endif + LOCAL s, qSize, qTBtn, a_, aBtns - STATIC aPanels := {} - - qSize := QSize():new( 16,16 ) + qSize := QSize():new( 20,20 ) ::oIde:qTBarPanels := QToolBar():new() ::qTBarPanels:setObjectName( "ToolBar_Panels" ) @@ -367,31 +445,60 @@ METHOD IdeDocks:buildToolBarPanels() ::qTBarPanels:setIconSize( qSize ) ::qTBarPanels:setMovable( .f. ) ::qTBarPanels:setFloatable( .f. ) + ::qTBarPanels:setStyleSheet( "QToolBar { spacing: 1px; color: white; margin-top: 2px; }" ) ::oDlg:oWidget:addToolBar( Qt_LeftToolBarArea, ::qTBarPanels ) - qAct := QToolButton():new( ::qTBarPanels ) - qAct:setMaximumHeight( 12 ) - qAct:setMaximumWidth( 20 ) - qAct:setTooltip( "Panel: Main" ) - //qAct:setStyleSheet( "background-color: rgb( 0,0,175 );" ) - qAct:setStyleSheet( "background-color: rgb( 132,66,0 );" ) - aadd( aPanels, qAct ) - qA := QAction():from( ::qTBarPanels:addWidget( qAct ) ) - qA:setCheckable( .t. ) - i := 0 + ::addPanelButton( "Main" ) FOR EACH s IN ::aINI[ INI_VIEWS ] -* ::qTBarPanels:addSeparator() - qAct := QToolButton():new( ::qTBarPanels ) - qAct:setMaximumHeight( 12 ) - qAct:setMaximumWidth( 20 ) - qAct:setTooltip( "Panel: " + s ) - qAct:setStyleSheet( "background-color: " + aColors[ ++i ] + ";" ) - IF i >= len( aColors ) - i := 0 - ENDIF - aadd( aPanels, qAct ) - ::qTBarPanels:addWidget( qAct ) + ::addPanelButton( s ) + NEXT + + /* Toolbar Line Actions */ + ::oDlg:oWidget:addToolBarBreak( Qt_LeftToolBarArea ) + + ::oIde:qTBarLines := QToolBar():new() + ::qTBarLines:setObjectName( "ToolBar_Lines" ) + ::qTBarLines:setAllowedAreas( Qt_LeftToolBarArea ) + ::qTBarLines:setOrientation( Qt_Vertical ) + ::qTBarLines:setIconSize( qSize ) + ::qTBarLines:setMovable( .f. ) + ::qTBarLines:setFloatable( .f. ) + + ::oDlg:oWidget:addToolBar( Qt_LeftToolBarArea, ::qTBarLines ) + + aBtns := {} + aadd( aBtns, { "up16" , "Move Current Line Up" , {|| ::oEM:moveLine( -1 ) } } ) + aadd( aBtns, { "down16" , "Move Current Line Down", {|| ::oEM:moveLine( 1 ) } } ) + aadd( aBtns, { "cutb16" , "Delete Current Line" , {|| ::oEM:deleteLine() } } ) + aadd( aBtns, { "copy" , "Duplicate Current Line", {|| ::oEM:duplicateLine() } } ) + FOR EACH a_ IN aBtns + qTBtn := QToolButton():new() + qTBtn:setTooltip( a_[ 2 ] ) + qTBtn:setIcon( ::resPath + a_[ 1 ] + ".png" ) + qTBtn:setMaximumWidth( 20 ) + qTBtn:setMaximumHeight( 20 ) + ::connect( qTBtn, "clicked()", a_[ 3 ] ) + ::qTBarLines:addWidget( qTBtn ) + aadd( ::aBtnLines, qTBtn ) + NEXT + + + aBtns := {} + aadd( aBtns, { "commentout" , "Block Comment" , {|| ::oEM:blockComment() } } ) + aadd( aBtns, { "increaseindent", "Indent Right" , {|| ::oEM:indent( 1 ) } } ) + aadd( aBtns, { "decreaseindent", "Indent Left" , {|| ::oEM:indent( -1 ) } } ) + aadd( aBtns, { "sgl2dblquote" , "Single to Double Quotes", {|| ::oEM:convertDQuotes() } } ) + aadd( aBtns, { "dbl2sglquote" , "Double to Single Quotes", {|| ::oEM:convertQuotes() } } ) + FOR EACH a_ IN aBtns + qTBtn := QToolButton():new() + qTBtn:setTooltip( a_[ 2 ] ) + qTBtn:setIcon( ::resPath + a_[ 1 ] + ".png" ) + qTBtn:setMaximumWidth( 20 ) + qTBtn:setMaximumHeight( 20 ) + ::connect( qTBtn, "clicked()", a_[ 3 ] ) + ::qTBarLines:addWidget( qTBtn ) + aadd( ::aBtnLines, qTBtn ) NEXT RETURN Self diff --git a/harbour/contrib/hbide/resources/cutb16.png b/harbour/contrib/hbide/resources/cutb16.png new file mode 100644 index 0000000000000000000000000000000000000000..4467d5513617dde232a30dbe1df4cc702445a40e GIT binary patch literal 982 zcmV;{11bE8P)DZyF)}YQHZL$V z9WFj{0009eNklJ5N8hu4{YF zPS4lh8)(Kg@6~(pzQ5#op7$k`QanjQY_M?6C@vj~Od`)cD`c~hU z{#QbM9#0v$@HC|OBK>DkAnv9{w7%Fx3(*c%tVkHDZe;Ade%!y_an@C(>ac0* zf~43d?=sh)alH>KYj*WKm2@cx0tj;Qt1!;;$dKQpdj WiV2K2D!T!+kipZ{&t;ucLK6TO#XEBV literal 0 HcmV?d00001 diff --git a/harbour/contrib/hbide/resources/down16.png b/harbour/contrib/hbide/resources/down16.png new file mode 100644 index 0000000000000000000000000000000000000000..c63e82684b5553d58c1f5c57d549cf3a1f2e3a27 GIT binary patch literal 884 zcmV-)1B?8LP)DZyIWIIXFf@5y zqtyTa0>w#0K~#90rP5t!Q+F80@$X4a&PjUm(#F)-E;_Z;YL&8Dkt*U=Q7OVEzD$H( z$QW#FD1zw4%Gg8&As`miyA1^KPA|k8Cv2caP)wCgv$RQDaW>I6MZyovLc@5SG2h&}-wBoOG{Pnj6YSZS(zE>HQ0& z^OC%OTT4&-^3A6sTHD@$8b+_`B(iaa#$v|go45BXMR9iOTx=SXZE*#8*LAF zGT}^;$iE<4(s7FrbB4{s_+PvpPG`&+`>TA^c(MrSzUABVP1mXWTi0yoUimlvP9!PJ z*wj?8dWd^AC6crIlY?d|53>a+tuIv}~bnm&)N4!3jL93Yt)r6IYMKF`ne zc)vzb6pB`XRAvOBNeC~klFfGj4gl{qdR8}V`YdMt$;3pCv3QPfsFA*%N9kSvC7J(< z2*U|N#wodw{R%Y)KP&)|2H(DMV}vn1MQ(PU;M97WMTuWUhT}sojtOHf{U`!iO<&T9R71E_U-jM$nZDr6G zs`KJ52Y8qrb@CO=iEA&4$|W6Oo6fyla5Cp$a3s8@m* zRRgnHq0Z^S?b0x8lUOpw)4`|cS^cW`U7T1H<(b#{Uxi4w*(SXk)@`IY_z87xFJ)t% z@#$B*OvFhICn@9$cd+ z)5S4FW8%__hI|YP9Lx^?{=Zz+%pKyhl9SIxPm`^o;FQ#|19s03aqMX33Titpn6ton zm&ccn+4@EYHeAa7EU2UWUv;Hmhzrw;xF_}HjWOJ2I#b(E{`PPKn$6(p>gTe~DWM4f DH!?FP literal 0 HcmV?d00001 diff --git a/harbour/contrib/hbide/resources/up16.png b/harbour/contrib/hbide/resources/up16.png new file mode 100644 index 0000000000000000000000000000000000000000..9ef0cb967946fa70d8743879e485a481aa5a4727 GIT binary patch literal 914 zcmV;D18w|?P)DZyIWIIXFf@5y zqtyTa0^>mY#f^laKT9_pY)z zz45(#c=+)?yze8Vl>DFZ-ANQe2<;Q5qrE(#I?8?au98!Cd%xS5GuHm$y?uiRzY&v< zj2wGswD0Jt!O*=Jp22TBt6a`5w{~wdE_f~VY;mquxFg`ni_zzw8=GC6PCwII@fFB6 zGn7r8fEb`=T719yE!!LVdZ!^z*4}FsZUIbuE)KphHM{!k!I#26$@ApRO)5qm!?dV1 zyU0!$zY^t2W(_OX{=szJ8RvbctpJE&A;yyrzx`19MEHXF5!+6Ia;ZuB`r|yEd=VFy zo9&zA^i7n0KVFyY7~PMz=`*x=#IaoL7##&P@MlCZoq_*(M#k zi-(8Ory>Ps_5i~vane&oIB#u|%kHrKV-FuZwSd+aM*_14&ayx90ImnI;9UelVO$}n z_W%JAI9zqA)LIthQiJ56#xMD0EG(*y&bh1eI5tFlF%n^okQ&BwrT^~;ouIX4Y@yd` zBu5i0D;N24cKWu#?uot zI(4$u4dQBw32ln~@%yoD7qeo5$5(r29GnelsmZ&S4jdU99gL^_BcI9RbnSQLqRij&NMc$j!^e{giM00e*w`WVC58z4gEU$eTjc`RuCBB7X925Y z&CAc^YyaAXfj9czjP%4_jSj?y{DA;w!$jA0>SjITcHB96PJaELWdiV@35@s^^|&YH oV=kWMxb`L5{4CGQ%I)6201Dh>aLQi)g#Z8m07*qoM6N<$f|1m*t^fc4 literal 0 HcmV?d00001