// THCommandBars.pkg // By SVN on 01/04/2017 // Use cCJCommandBarSystem.pkg Class cTHCJTabControlItem is a cCJTabControlItem End_Class Class cTHCJTabWorkspace is a cCJTabWorkspace Procedure OnComRClick Variant llItem Handle hoTab Get Create (RefClass(cTHCJTabControlItem)) to hoTab // If (hoTab) Begin Set pvComObject of hoTab to llItem Set psFileName of (oFileContextMenu(Self)) to (ComToolTip(hoTab)) Set piFileTabMenu of (oFileContextMenu(Self)) to True Send Destroy to hoTab Send Popup to (oFileContextMenu(Self)) Set piFileTabMenu of (oFileContextMenu(Self)) to False End // Else = Can not get access to the Tab Control Item (no any message/error to do not confuse user) End_Procedure Procedure OnComSelectedChanged Variant llItem Handle hoTab Get Create (RefClass(cTHCJTabControlItem)) to hoTab // If (hoTab) Begin Set pvComObject of hoTab to llItem Move hoTab to ghoCurrentFileTab End // Enimerator of Tabs // Integer iItems iItem // Showln "List Cnt=" (ComItemCount(Self)) // Get ComItemCount to iItems // For iItem from 0 to (iItems-1) // Get ComItem iItem to llItem // Get Create (RefClass(cTHCJTabControlItem)) to hoTab // If (hoTab) Begin // Set pvComObject of hoTab to llItem // Showln "Item " iItem " [" (ComCaption(hoTab)) "] [" (ComToolTip(hoTab)) "]" // If (iItem < (iItems-1)) Begin // Set ComCaption of hoTab to ('?'+ComCaption(hoTab)) // Set ComToolTip of hoTab to (ComCaption(hoTab)) // End // Send Destroy to hoTab // End // Loop End_Procedure End_Class Class cTHCJCommandBarSystem is a cCJCommandBarSystem Procedure Construct_Object Forward Send Construct_Object Set pbTimerUpdate to True Set peVisualTheme to xtpThemeVisualStudio2008 // xtpThemeWhidbey // xtpThemeVisualStudio2010 // DF19.0 offers a autoresize function for the codejock icons, use it Set pbAutoResizeIcons to True End_Procedure Procedure Translate End_Procedure Procedure OnCreateCommandBars Handle hoTab hoTabPaintManager hoTabPaintManagerColorSet Variant vTab vTabPaintManagerColorSet Handle hoOptions // Integer iOption Boolean bMultiRow String sOption // Forward Send OnCreateCommandBars Get OptionsObject to hoOptions // ***************** Handle hoPaintManager Variant vPaintManager Get ComPaintManager to vPaintManager Get Create (RefClass(cCJPaintManager)) to hoPaintManager If hoPaintManager Begin Set pvComObject of hoPaintManager to vPaintManager Set ComThemedStatusBar of hoPaintManager to False Send Destroy to hoPaintManager End Get pbFileTabsMultiRow of ghoEditorProperties to bMultiRow // ***************** // Get Create (RefClass(cTHCJTabWorkspace)) To hoTab If (hoTab) Begin Get ComShowTabWorkspace True to vTab // Set pvComObject of hoTab to vTab Set ComAutoTheme of hoTab to False Set ComThemedBackColor of hoTab to True Set ComFlags of hoTab to (xtpWorkspaceShowActiveFiles + xtpWorkspaceShowCloseTab) Send ComEnableGroups of hoTab // Tab Paint Manager // Paint manager for open view tabs Get Create (RefClass(cCJTabPaintManager)) to hoTabPaintManager If (hoTabPaintManager) Begin Set pvComObject of hoTabPaintManager to (ComPaintManager(hoTab)) If (bMultiRow) Begin Set ComLayout of hoTabPaintManager to xtpTabLayoutMultiRow // goes behind groups if minimised End Else Begin Set ComLayout of hoTabPaintManager to xtpTabLayoutAutoSize //xtpTabLayoutSizeToFit //xtpTabLayoutMultiRow // goes behind groups if minimised End Set ComToolTipBehaviour of hoTabPaintManager to xtpTabToolTipAlways // Send SetTabLocation hoTabPaintManager Send SetTabAppearance hoTabPaintManager Send SetTabColor hoTabPaintManager // Set ComBoldSelected of hoTabPaintManager to True Set ComClearTypeTextQuality of hoTabPaintManager to True Set ComShowIcons of hoTabPaintManager to False Set ComDrawTextPathEllipsis of hoTabPaintManager to False // (...) Set ComHotTracking of hoTabPaintManager to True Set ComMultiRowFixedSelection of hoTabPaintManager to False Set ComMultiRowJustified of hoTabPaintManager to True Set ComRotateImageOnVerticaldraw of hoTabPaintManager to True // Tab Colorset Get ComColorSet of hoTabPaintManager to vTabPaintManagerColorSet Get Create (RefClass(cCjTabPaintManagerColorSet)) to hoTabPaintManagerColorSet If (hoTabPaintManagerColorSet) Begin Set pvComObject of hoTabPaintManagerColorSet to vTabPaintManagerColorSet Set ComPaneFace of hoTabPaintManagerColorSet to clBlack Send Destroy of hoTabPaintManagerColorSet End Send Destroy of hoTabPaintManager End // // Send mCreateToolPanes (Object_Id(Self)) //@ RRS Not needed // Send Translate // // Sending destroy here will break tab contextmenu and the tab onchange event // also no longer gets called. //Send Destroy of hoTab End End_Procedure Procedure SetTabAppearance Handle hoTabPaintManager String sOption Integer iOption Move (Uppercase(psFileTabsAppearance(ghoEditorProperties))) to sOption Move xtpTabThemeExcel2003 to iOption If (sOption="PROPERTY") Move xtpTabAppearancePropertyPage to iOption If (sOption="PROPERTY2003") Move xtpTabAppearancePropertyPage2003 to iOption If (sOption="PROPERTYFLAT") Move xtpTabAppearancePropertyPageFlat to iOption If (sOption="PROPERTY2007") Move xtpTabAppearancePropertyPage2007 to iOption If (sOption="STATEBUTTON") Move xtpTabAppearanceStateButtons to iOption If (sOption="EXCEL") Move xtpTabAppearanceExcel to iOption If (sOption="EXCEL2003") Move xtpTabThemeExcel2003 to iOption If (sOption="FLAT") Move xtpTabAppearanceFlat to iOption If (sOption="VISIO") Move xtpTabAppearanceVisio to iOption If (sOption="ACCESS2007") Move xtpTabAppearancePropertyPageAccess2007 to iOption If (sOption="THEMEVS2003") Move xtpTabThemeVisualStudio2003 to iOption If (sOption="THEMEVS2005") Move xtpTabThemeVisualStudio2005 to iOption If (sOption="THEMEVS2010") Move xtpTabThemeVisualStudio2010 to iOption If (sOption="THEMEVS2012") Move xtpTabThemeVisualStudio2012 to iOption If (sOption="OFFICE2013") Move xtpTabThemeOffice2013 to iOption If (sOption="VS") Move xtpTabAppearanceVisualStudio to iOption If (sOption="VS2003") Move xtpTabAppearanceVisualStudio2003 to iOption If (sOption="VS2005") Move xtpTabAppearanceVisualStudio2005 to iOption If (sOption="VS2010") Move xtpTabAppearanceVisualStudio2010 to iOption If (sOption="VS2012") Move xtpTabAppearanceVisualStudio2012 to iOption Set ComAppearance of hoTabPaintManager to iOption End_Procedure Procedure SetTabLocation Handle hoTabPaintManager String sOption Integer iOption Move (Uppercase(psFileTabsLocation(ghoEditorProperties))) to sOption Move xtpTabPositionBottom to iOption If (sOption="TOP") Move xtpTabPositionTop to iOption Set ComPosition of hoTabPaintManager to iOption End_Procedure Procedure SetTabColor Handle hoTabPaintManager String sOption Integer iOption Move (Uppercase(psFileTabsColor(ghoEditorProperties))) to sOption Move xtpTabColorDefault to iOption If (sOption="OFFICE2003") Move xtpTabColorOffice2003 to iOption If (sOption="NATIVE") Move xtpTabColorWinNative to iOption If (sOption="RESOURCE") Move xtpTabColorResource to iOption If (sOption="VS") Move xtpTabColorVisualStudio to iOption If (sOption="VS2003") Move xtpTabColorVisualStudio2003 to iOption If (sOption="VS2005") Move xtpTabColorVisualStudio2005 to iOption If (sOption="VS2006") Move xtpTabColorVisualStudio2008 to iOption If (sOption="VS2019") Move xtpTabColorVisualStudio2010 to iOption If (sOption="VS2012") Move xtpTabColorVisualStudio2012 to iOption If (sOption="VS2012DK") Move xtpTabColorVisualStudio2012Dark to iOption If (sOption="OACCESS2007") Move xtpTabColorOffice2007Access to iOption If (sOption="OFFICE2007") Move xtpTabColorOffice2007 to iOption If (sOption="OFFICE2013") Move xtpTabColorOffice2013 to iOption If (sOption="ALL") Move xtpTabColorAll to iOption If (sOption="WINXP") Move xtpTabColorWinXP to iOption If (sOption="WHIDBEY") Move xtpTabColorWhidbey to iOption If (sOption="ACCESS2007") Move xtpTabColorAccess2007 to iOption Set ComColor of hoTabPaintManager to iOption End_Procedure End_Class