Guidance
指路人
g.yi.org
software / rapidq / Examples / Tools - IDE, Designer, Builder / FreeQ IDE src / inc ide / TopPanel.inc

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
     DECLARE SUB ManageTopPanel
     DECLARE SUB WidgetTabOnChange

'===========================================================
     CREATE TopPanel AS QPANEL        'control panel with Qobject clicks etc.
      PARENT = MainForm
      Top  = 0
      Left = 0
      Width = MainForm.ClientWidth
      Height = 58
      Alignment = taCenter
      Align = alTop
     END CREATE


'=========File panel Tool ====================
     CREATE FileToolPanel AS QPANEL
      PARENT = TopPanel
      Height = 28
      CREATE ToolBtn1 AS QXPButton
       BMPHandle = new_BMP
       Top  = 1
       Left = 2
       Width = 23
       Height = 26
       Hint = "New"
       ShowHint = 1
       OnClick = MFE_NewFile
      END CREATE
      CREATE ToolBtn2 AS QXPButton
       BMPHandle = open_BMP
       Top  = 1
       Left = 26
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Open"
       ShowHint = 1
       OnClick = MFE_Open
      END CREATE
      CREATE ToolBtn2b AS QXPButton
       BMPHandle = DownArrow_BMP
       Top  = 1
       Left = 50
       Width = 13
       Height = 26
       CAPTION = ""
       OnClick = RecentFilePopup_Popup
      END CREATE
      CREATE SaveToolBtn AS QBUTTON
       BMPHandle = save_BMP
       Top  = 1
       Left = 64
       Width = 23
       Height = 26
       CAPTION = ""
       NumBMPs = 2
       Hint = "Save"
       ShowHint = 1
       OnClick = MFE_Save
      END CREATE
      CREATE ToolBtn3b AS QXPButton
       BMPHandle = saveAll_BMP
       Top  = 1
       Left = 88
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Save All"
       ShowHint = 1
       OnClick = MFE_SaveAll
      END CREATE
      CREATE OpenProjBtn AS QXPButton
       BMPHandle = OpenProj_BMP
       Top  = 1
       Left = 88+24
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Open Project"
       ShowHint = 1
       OnClick = MFE_OpenProject
      END CREATE
      CREATE SaveProjBtn AS QXPButton
       BMPHandle = SaveProj_BMP
       Top  = 1
       Left = 88+24+24
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Save Project"
       ShowHint = 1
       OnClick = MFE_SaveProject
      END CREATE
      CREATE RecentProjBtn AS QXPButton
       BMPHandle = DownArrow_BMP
       Top  = 1
       Left = 88+24+24+24
       Width = 13
       Height = 26
       CAPTION = ""
       OnClick = RecentProj_Popup
      END CREATE


'     CREATE CoolBtn4 AS QXPButton
'         BMPHandle = print_BMP
'         Top  = 1
'         Left = 112
'         Width = 23
'         Height = 26
'         Caption = ""
'         'NumBMPs = 4
'         Hint = "Print"
'         ShowHint = 1
'         OnClick = pageprintclick
'     END CREATE
      Width =  ToolBtn1.Width + ToolBtn2.Width + ToolBtn2b.Width + SaveToolBtn.Width + ToolBtn3b.Width + OpenProjBtn.Width + SaveProjBtn.Width + RecentProjBtn.Width + 12
     END CREATE



'============  edit tool panel ==========
     CREATE EditToolPanel AS QPANEL
      PARENT = TopPanel
      Width = 75
      Height = 28
      Left = FileToolPanel.Left + FileToolPanel.Width + 4
      CREATE CoolBtn5 AS QXPButton
       BMPHandle = cut_BMP
       Top  = 1
       Left = 2
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Cut"
       ShowHint = 1
       OnClick = cutClick
      END CREATE
      CREATE CoolBtn6 AS QXPButton
       BMPHandle = copy_BMP
       Top  = 1
       Left = 26
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Copy"
       ShowHint = 1
       OnClick = copyClick
      END CREATE
      CREATE CoolBtn7 AS QXPButton
       BMPHandle = paste_BMP
       Top  = 1
       Left = 50
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Paste"
       ShowHint = 1
       OnClick = pasteClick
      END CREATE
     END CREATE



'======= Compile ToolPanel =================
     CREATE CompileToolPanel AS QPANEL
      PARENT = TopPanel
      Width = 128
      Height = 28
'    Left = EditToolPanel.Left + EditToolPanel.Width + 4
      Top = FileToolPanel.Top + FileToolPanel.Height + 2
      Left = 2

      CREATE CoolBtn10a AS QXPButton
       BMPHandle = options_BMP
       Top  = 1
       Left = 2
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Compile options"
       ShowHint = 1
       OnClick = IDE_Conf_CompileOpt_Show
      END CREATE
      CREATE CoolBtn10 AS QXPButton
       BMPHandle = Compile_BMP
       Top  = 1
       Left = 26
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Compile"
       ShowHint = 1
       OnClick = compileClick
      END CREATE
      CREATE CoolBtn11 AS QXPButton
       BMPHandle = Run_BMP
       Top  = 1
       Left = 50
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Execute Application"
       ShowHint = 1
       OnClick = RunClick
      END CREATE
      CREATE CoolBtn12 AS QXPButton
       BMPHandle = help_BMP
       Top  = 1
       Left = 74
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Compiler Help"
       ShowHint = 1
       OnClick = mnuHelpClick
      END CREATE
      CREATE CoolBtn13 AS QXPButton
       BMPHandle = FBlogo_bmp
       Top  = 1
       Left = 98
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Compile as FB DLL"
       ShowHint = 1
       OnClick = FBDLLClick
      END CREATE
     END CREATE



'======= ViewToolPanel =================
     CREATE ViewToolPanel AS QPANEL
      PARENT = TopPanel
      Width = 146
      Height = 28
'    Top = 2
      Top = FileToolPanel.Top + FileToolPanel.Height + 2
      Left = CompileToolPanel.Left + CompileToolPanel.Width + 4

      CREATE CoolBtn14 AS QXPButton
       BMPHandle = ZoomIn_bmp
       Top  = 1
       Left = 2
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Increase Text size"
       ShowHint = 1
       OnClick = mnuMagnifyFont_Click
      END CREATE
      CREATE CoolBtn15 AS QXPButton
       BMPHandle = ZoomOut_bmp
       Top  = 1
       Left = 26
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Reduce Text size"
       ShowHint = 1
       OnClick = mnuMinifyFont_Click
      END CREATE
      CREATE CoolBtn16 AS QXPButton
       BMPHandle = ZoomRestore_bmp
       Top  = 1
       Left = 50
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Restore Text size"
       ShowHint = 1
       OnClick = mnuRestoreFontMagnification_Click
      END CREATE

      CREATE CoolBtn17 AS QXPButton
       BMPHandle = Highlighting_bmp
       Top  = 1
       Left = 74
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Syntax highlighting"
       ShowHint = 1
       OnClick = Mnu_HilightClick
      END CREATE
      CREATE CoolBtn18 AS QXPButton
       BMPHandle = LineNumbers_bmp
       Top  = 1
       Left = 98
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Toggle line numbers"
       ShowHint = 1
       OnClick = Mnu_SetLineNumbersClick
      END CREATE

      CREATE CoolBtn20 AS QXPButton
       BMPHandle = ViewIndents_bmp
       Top  = 1
       Left = 122
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "View Indents"
       ShowHint = 1
       OnClick = Mnu_ViewIndentationClick
      END CREATE
     END CREATE



'======= Code folding ToolPanel =================
     CREATE CodeFoldingToolPanel AS QPANEL
      PARENT = TopPanel
      Width = 53
      Height = 28
'    Top = 2
      Top = FileToolPanel.Top + FileToolPanel.Height + 2
      Left = ViewToolPanel.Left + ViewToolPanel.Width + 4
      CREATE CoolBtn19 AS QXPButton
       BMPHandle = CodeFolding_bmp
       Top  = 1
       Left = 2
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Toggle Code Folding"
       ShowHint = 1
       OnClick = Mnu_CodeFolding_Click
      END CREATE
      CREATE CoolBtn19b AS QXPButton
       BMPHandle = CodeFoldingExpandAll_bmp
       Top  = 1
       Left = 26
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Toggle Expand / Collapse"
       ShowHint = 1
       OnClick = Mnu_CodeFoldingExpandAll_Click
      END CREATE
'    CREATE CoolBtn19c AS QXPButton
'        BMPHandle = CodeFoldingCollapseAll_bmp
'        Top  = 1
'        Left = 50
'        Width = 23
'        Height = 26
'        Caption = ""
'        Hint = "Collapse All"
'        ShowHint = 1
'        OnClick = Mnu_CodeFoldingCollapseAll_Click
'        'NumBMPs = 4
'        'OnMouseMove = QBouton_MouseMove
'    END CREATE

     END CREATE



'======= Format ToolPanel =================
     CREATE FormatToolPanel AS QPANEL
      PARENT = TopPanel
      Width = 196
      Height = 28
'    Top = 2
      Top = FileToolPanel.Top + FileToolPanel.Height + 2
      Left = CodeFoldingToolPanel.Left + CodeFoldingToolPanel.Width + 4
      CREATE CoolBtn20a AS QXPButton
       BMPHandle = Indent_bmp
       Top  = 1
       Left = 2
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Indent Block"
       ShowHint = 1
       OnClick = Mnu_IndentBlock_Click
      END CREATE
      CREATE CoolBtn20b AS QXPButton
       BMPHandle = UnIndent_bmp
       Top  = 1
       Left = 26
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "(Un)indent Block"
       ShowHint = 1
       OnClick = Mnu_UnIndentBlock_Click
      END CREATE
      CREATE CoolBtn20c AS QXPButton
       BMPHandle = CommentBlock_bmp
       Top  = 1
       Left = 50
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Comment Block"
       ShowHint = 1
       OnClick = mnuCommentBlockClick
      END CREATE
      CREATE CoolBtn20d AS QXPButton
       BMPHandle = UnCommentBlock_bmp
       Top  = 1
       Left = 74
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "(Un)Comment Block"
       ShowHint = 1
       OnClick = mnuUnCommentBlockClick
      END CREATE

      CREATE CoolBtn20e AS QXPButton
       BMPHandle = LowerCase_bmp
       Top  = 1
       Left = 98
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "To Lower Case"
       ShowHint = 1
       OnClick = Mnu_LowercaseClick
      END CREATE
      CREATE CoolBtn20f AS QXPButton
       BMPHandle = UpperCase_bmp
       Top  = 1
       Left = 122
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "To Upper Case"
       ShowHint = 1
       OnClick = Mnu_UppercaseClick
      END CREATE

      CREATE CoolBtn20g AS QXPButton
       BMPHandle = AutoIndent_bmp
       Top  = 1
       Left = 146
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Auto Indent"
       ShowHint = 1
       OnClick = Mnu_AutoIndentClick
      END CREATE
      CREATE CoolBtn20h AS QXPButton
       BMPHandle = WordWrap_bmp
       Top  = 1
       Left = 170
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "Toggle Word Wrap"
       ShowHint = 1
       OnClick = Mnu_WordWrapClick
      END CREATE
     END CREATE


'======= BookMark ToolPanel =================
     CREATE BookMarkToolPanel AS QPANEL
      PARENT = TopPanel
      Width = 126
      Height = 28
'    Top = 2
      Top = FileToolPanel.Top + FileToolPanel.Height + 2
      Left = FormatToolPanel.Left + FormatToolPanel.Width + 4
      CREATE CoolBtn21 AS QXPButton
       BMPHandle = ViewBookMarks_bmp
       Top  = 1
       Left = 2
       Width = 23
       Height = 26
       CAPTION = ""
       Hint = "View BookMarks"
       ShowHint = 1
       OnClick = mnuNViewBookMark_Click
      END CREATE
      CREATE CoolBtn22 AS QXPButton
       BMPHandle = BookMarkAdd_bmp
       Top  = 1
       Left = 26
       Width = 26
       Height = 26
       CAPTION = ""
       Hint = "Add BookMark"
       ShowHint = 1
       OnClick = mnuAddBookMark_Click
      END CREATE
      CREATE CoolBtn23 AS QXPButton
       BMPHandle = BookMarkPrev_bmp
       Top  = 1
       Left = 50
       Width = 26
       Height = 26
       CAPTION = ""
       Hint = "Previous BookMark"
       ShowHint = 1
       OnClick = mnuPrevBookMark_Click
      END CREATE
      CREATE CoolBtn24 AS QXPButton
       BMPHandle = BookMarkNext_bmp
       Top  = 1
       Left = 74
       Width = 26
       Height = 26
       CAPTION = ""
       Hint = "Next BookMark"
       ShowHint = 1
       OnClick = mnuNextBookMark_Click
      END CREATE
      CREATE CoolBtn25 AS QXPButton
       BMPHandle = BookMarkDel_bmp
       Top  = 1
       Left = 100
       Width = 26
       Height = 26
       CAPTION = ""
       Hint = "Delete BookMark"
       ShowHint = 1
       OnClick = mnuDelBookMark_Click
      END CREATE
     END CREATE

     CREATE IconsetFlatButton AS QIMAGE
      PARENT = TopPanel
      Top = 2
      Width = 24          '48
      Height = 24        '48
      Left = ViewToolPanel.Left + ViewToolPanel.Width + 4
      Stretch = True
      AutoSize = True
      IcoHandle = RapidQ_ico      'APPLICATION_ICON
      Hint = "Application Icon"
      ShowHint = True
      Transparent = 1
      OnClick = IconsetClick
     END CREATE

' CREATE CloseMFE_butn AS QOvalBtn 'QBUTTON
'     Parent = TopPanel
'     Top  = 1
'     Left = TopPanel.width - 28
'     Width = 27
'     Height = 27
'     BMPHandle = closeTab_BMP
'     Caption = ""
'     Hint = "Close Tab"
'     ShowHint = 1
'     OnClick = MFE_Close
' END CREATE





     CREATE WidgetTab AS QTABCONTROL
      PARENT = TopPanel
      Top  = 0
      Width = 532
      Left = MainForm.ClientWidth - WidgetTab.Width -2
      Height = 54
      AddTabs("Standard", "Additional" , "Dialogs" , "Extended", "DX-Media")
      Hint = "Left click to insert snippet code," + CRLF + _
       "Right click to edit snippet"
      ShowHint = 1
      OnChange = WidgetTabOnChange

    '________________'All buttons on this one panel switch by button properties ___________________
      CREATE WidgetPanel AS QPANEL
       PARENT = WidgetTab
       Top  = 23
       Left  = 2
       Width = WidgetTab.Width
       Height = 28
       Visible = True
       Hint = WidgetTab.Hint
       ShowHint = 1
       BevelInner = bvLowered
       BevelWidth = 0
      END CREATE
     END CREATE


      '_________________bottoni pannello strumenti 0________________________


     CREATE Widgetbutton0 AS QCOOLBTN
      Left = 2
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 0
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton1 AS QCOOLBTN
      Left = Widgetbutton0.Width + Widgetbutton0.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 1
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton2 AS QCOOLBTN
      Left = Widgetbutton1.Width + Widgetbutton1.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 2
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton3 AS QCOOLBTN
      Left = Widgetbutton2.Width + Widgetbutton2.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 3
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton4 AS QCOOLBTN
      Left = Widgetbutton3.Width + Widgetbutton3.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 4
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton5 AS QCOOLBTN
      Left = Widgetbutton4.Width + Widgetbutton4.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 5
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton6 AS QCOOLBTN
      Left = Widgetbutton5.Width + Widgetbutton5.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 6
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton7 AS QCOOLBTN
      Left = Widgetbutton6.Width + Widgetbutton6.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 7
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton8 AS QCOOLBTN
      Left = Widgetbutton7.Width + Widgetbutton7.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 8
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton9 AS QCOOLBTN
      Left = Widgetbutton8.Width + Widgetbutton8.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 9
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton10 AS QCOOLBTN
      Left = Widgetbutton9.Width + Widgetbutton9.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 10
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton11 AS QCOOLBTN
      Left = Widgetbutton10.Width + Widgetbutton10.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 11
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton12 AS QCOOLBTN
      Left = Widgetbutton11.Width + Widgetbutton11.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 12
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton13 AS QCOOLBTN
      Left = Widgetbutton12.Width + Widgetbutton12.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 13
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton14 AS QCOOLBTN
      Left = Widgetbutton13.Width + Widgetbutton13.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 14
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton15 AS QCOOLBTN
      Left = Widgetbutton14.Width + Widgetbutton14.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 15
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton16 AS QCOOLBTN
      Left = Widgetbutton15.Width + Widgetbutton15.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 16
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton17 AS QCOOLBTN
      Left = Widgetbutton16.Width + Widgetbutton16.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 17
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     CREATE Widgetbutton18 AS QCOOLBTN
      Left = Widgetbutton17.Width + Widgetbutton17.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 18
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

'max button for each tab
     CREATE Widgetbutton19 AS QCOOLBTN
      Left = Widgetbutton18.Width + Widgetbutton18.Left
      Top = 1
      Width = 26
      Height = 24
      PARENT = WidgetPanel
      tag = 19
      ShowHint = True
      OnMouseDown = Widget_Click
     END CREATE

     WidgetPanel.Width = Widgetbutton19.Width + Widgetbutton19.Left + 4


''____________________________________________________
''final widget
'CREATE WidgetTrashButton AS QCOOLBTN
'    Left = Widgetbutton19.Left + Widgetbutton19.Width
'    Top = 1
'    Width = 26
'    Height = 24
'    Parent = WidgetPanel
'    BMPHandle = TRASH_BMP
'    Hint = "Delete"
'    ShowHint = True
''    OnClick = remove
'END CREATE

'____________________________________________________

     WidgetTab.TabIndex = 0
     WidgetTabOnChange           'set them up


     SUB WidgetTabOnChange
      SELECT CASE WidgetTab.TabIndex
      CASE 0                                  'standard
       Widgetbutton0.BMPHandle = Application_bmp    :  Widgetbutton0.Hint = "New Application"  :  Widgetbutton0.Visible = True
       Widgetbutton1.BMPHandle = LABEL_BMP          :  Widgetbutton1.Hint = "label"            :  Widgetbutton1.Visible = True
       Widgetbutton2.BMPHandle = EDIT_BMP           :  Widgetbutton2.Hint = "edit"             :  Widgetbutton2.Visible = True
       Widgetbutton3.BMPHandle = BUTTON_BMP         :  Widgetbutton3.Hint = "button"           :  Widgetbutton3.Visible = True
       Widgetbutton4.BMPHandle = COOLBTN_BMP        :  Widgetbutton4.Hint = "coolbtn"          :  Widgetbutton4.Visible = True
       Widgetbutton5.BMPHandle = OVALBTN_BMP        :  Widgetbutton5.Hint = "ovalbtn"          :  Widgetbutton5.Visible = True
       Widgetbutton6.BMPHandle = IMAGE_BMP          :  Widgetbutton6.Hint = "image"            :  Widgetbutton6.Visible = True
       Widgetbutton7.BMPHandle = CANVAS_BMP         :  Widgetbutton7.Hint = "canvas"           :  Widgetbutton7.Visible = True
       Widgetbutton7.BMPHandle = GAUGE_BMP          :  Widgetbutton7.Hint = "gauge"            :  Widgetbutton7.Visible = True
       Widgetbutton8.BMPHandle = CHECKBOX_BMP       :  Widgetbutton8.Hint = "checkbox"         :  Widgetbutton8.Visible = True
       Widgetbutton9.BMPHandle = RADIOBUTTON_BMP    :  Widgetbutton9.Hint = "radiobutton"      :  Widgetbutton9.Visible = True
       Widgetbutton10.BMPHandle = COMBOBOX_BMP      :  Widgetbutton10.Hint = "combobox"        :  Widgetbutton10.Visible = True
       Widgetbutton11.BMPHandle = LISTBOX_BMP       :  Widgetbutton11.Hint = "listbox"         :  Widgetbutton11.Visible = True
       Widgetbutton12.BMPHandle = PANEL_BMP         :  Widgetbutton12.Hint = "panel"           :  Widgetbutton12.Visible = True
       Widgetbutton13.BMPHandle = TABCONTROL_BMP    :  Widgetbutton13.Hint = "tabcontrol"      :  Widgetbutton13.Visible = True
       Widgetbutton14.BMPHandle = RICHEDIT_BMP      :  Widgetbutton14.Hint = "richedit"        :  Widgetbutton14.Visible = True
       Widgetbutton15.BMPHandle = STRINGGRID_BMP    :  Widgetbutton15.Hint = "stringgrid"      :  Widgetbutton15.Visible = True
       Widgetbutton16.BMPHandle = SCROLLBOX_BMP     :  Widgetbutton16.Hint = "scrollbox"       :  Widgetbutton16.Visible = True
       Widgetbutton17.BMPHandle = STATUSBAR_BMP     :  Widgetbutton17.Hint = "statusbar"       :  Widgetbutton17.Visible = True
       Widgetbutton18.BMPHandle = SCROLLBAR_BMP     :  Widgetbutton18.Hint = "scrollbar"       :  Widgetbutton18.Visible = True
       Widgetbutton19.BMPHandle = TRACKBAR_BMP      :  Widgetbutton19.Hint = "trackbar"        :  Widgetbutton19.Visible = True
'sasdfasdf
'label, edit, button, coolbtn, ovalbutton,image, canvas, gauge, checkbox, radiobutton, combobox, listbox, scrollbox, richedit, stringgrid, tabcontrol, statusbar, scrollbar, trackbar, filelistbox

      CASE 1                                  'additional
       Widgetbutton0.BMPHandle = splitter_bmp       :  Widgetbutton0.Hint = "Splitter"          :  Widgetbutton0.Visible = True
       Widgetbutton1.BMPHandle = ListView_bmp       :  Widgetbutton1.Hint = "ListView"          :  Widgetbutton1.Visible = True
       Widgetbutton2.BMPHandle = TreeView_bmp       :  Widgetbutton2.Hint = "TreeView"          :  Widgetbutton2.Visible = True
       Widgetbutton3.BMPHandle = header_bmp         :  Widgetbutton3.Hint = "Header"            :  Widgetbutton3.Visible = True
       Widgetbutton4.BMPHandle = Outline_bmp        :  Widgetbutton4.Hint = "Outline"           :  Widgetbutton4.Visible = True
       Widgetbutton5.BMPHandle = StringList_bmp     :  Widgetbutton5.Hint = "StringList"        :  Widgetbutton5.Visible = True
       Widgetbutton6.BMPHandle = ImageList_bmp      :  Widgetbutton6.Hint = "ImageList"         :  Widgetbutton6.Visible = True
       Widgetbutton7.BMPHandle = Timer_bmp          :  Widgetbutton7.Hint = "Timer"             :  Widgetbutton7.Visible = True
       Widgetbutton8.BMPHandle = FileStream_bmp     :  Widgetbutton8.Hint = "FileStream"        :  Widgetbutton8.Visible = True
       Widgetbutton9.BMPHandle = MemoryStream_bmp   :  Widgetbutton9.Hint = "MemoryStream"      :  Widgetbutton9.Visible = True
       Widgetbutton10.BMPHandle = GAUGE_BMP         :  Widgetbutton10.Hint = "gauge"            :  Widgetbutton10.Visible = True
       Widgetbutton11.BMPHandle = OleContainer_bmp  :  Widgetbutton11.Hint = "OleContainer"     :  Widgetbutton11.Visible = True
       Widgetbutton12.BMPHandle = Ole_bmp           :  Widgetbutton12.Hint = "OLEObject"        :  Widgetbutton12.Visible = True
       Widgetbutton13.BMPHandle = Socket_bmp        :  Widgetbutton13.Hint = "Socket"           :  Widgetbutton13.Visible = True
       Widgetbutton14.BMPHandle = MainMenu_bmp      :  Widgetbutton14.Hint = "MainMenu"         :  Widgetbutton14.Visible = True
       Widgetbutton15.BMPHandle = MenuItem_bmp      :  Widgetbutton15.Hint = "MenuItem"         :  Widgetbutton15.Visible = True
       Widgetbutton16.BMPHandle = Font_bmp          :  Widgetbutton16.Hint = "Font"             :  Widgetbutton16.Visible = True
       Widgetbutton17.Visible = False
       Widgetbutton18.Visible = False
       Widgetbutton19.Visible = False

      CASE 2                              'Dialogs
       Widgetbutton0.BMPHandle = OpenDialog_bmp     :  Widgetbutton0.Hint = "OpenDialog"        :  Widgetbutton0.Visible = True
       Widgetbutton1.BMPHandle = SaveDialog_bmp     :  Widgetbutton1.Hint = "SaveDialog"        :  Widgetbutton1.Visible = True
       Widgetbutton2.BMPHandle = FileDialog_bmp     :  Widgetbutton2.Hint = "FileDialog"        :  Widgetbutton2.Visible = True
       Widgetbutton3.BMPHandle = ColorDialog_bmp    :  Widgetbutton3.Hint = "ColorDialog"       :  Widgetbutton3.Visible = True
       Widgetbutton4.BMPHandle = FontDialog_bmp     :  Widgetbutton4.Hint = "FontDialog"        :  Widgetbutton4.Visible = True
       Widgetbutton5.Visible = False
       Widgetbutton6.Visible = False
       Widgetbutton7.Visible = False
       Widgetbutton8.Visible = False
       Widgetbutton9.Visible = False
       Widgetbutton10.Visible = False
       Widgetbutton11.Visible = False
       Widgetbutton12.Visible = False
       Widgetbutton13.Visible = False
       Widgetbutton14.Visible = False
       Widgetbutton15.Visible = False
       Widgetbutton16.Visible = False
       Widgetbutton17.Visible = False
       Widgetbutton18.Visible = False
       Widgetbutton19.Visible = False

      CASE 3                              'Extended
       Widgetbutton0.BMPHandle = FormEx_bmp       :  Widgetbutton0.Hint = "FormEx"                :  Widgetbutton0.Visible = True
       Widgetbutton1.BMPHandle = CanvasEx_bmp     :  Widgetbutton1.Hint = "CanvasEx"              :  Widgetbutton1.Visible = True
       Widgetbutton2.BMPHandle = ImageEx_bmp      :  Widgetbutton2.Hint = "ImageEx"               :  Widgetbutton2.Visible = True
       Widgetbutton3.BMPHandle = BitmapEx_bmp     :  Widgetbutton3.Hint = "BitmapEx"              :  Widgetbutton3.Visible = True
       Widgetbutton4.BMPHandle = system_bmp       :  Widgetbutton4.Hint = "System"            :  Widgetbutton4.Visible = True
       Widgetbutton5.Visible = False
       Widgetbutton6.Visible = False
       Widgetbutton7.Visible = False
       Widgetbutton8.Visible = False
       Widgetbutton9.Visible = False
       Widgetbutton10.Visible = False
       Widgetbutton11.Visible = False
       Widgetbutton12.Visible = False
       Widgetbutton13.Visible = False
       Widgetbutton14.Visible = False
       Widgetbutton15.Visible = False
       Widgetbutton16.Visible = False
       Widgetbutton17.Visible = False
       Widgetbutton18.Visible = False
       Widgetbutton19.Visible = False

      CASE ELSE                              'DX - Media
       Widgetbutton0.BMPHandle = DXTimer_bmp       :  Widgetbutton0.Hint = "DXTimer"          :  Widgetbutton0.Visible = True
       Widgetbutton1.BMPHandle = DXSound_bmp       :  Widgetbutton1.Hint = "DXSound"          :  Widgetbutton1.Visible = True
       Widgetbutton2.BMPHandle = DXScreen_bmp       :  Widgetbutton2.Hint = "DXScreen"          :  Widgetbutton2.Visible = True
       Widgetbutton3.BMPHandle = DXImageList_bmp         :  Widgetbutton3.Hint = "DXImageList"            :  Widgetbutton3.Visible = True
       Widgetbutton4.BMPHandle = D3DFace_bmp        :  Widgetbutton4.Hint = "D3DFace"           :  Widgetbutton4.Visible = True
       Widgetbutton5.BMPHandle = D3DMeshBuilder_bmp     :  Widgetbutton5.Hint = "D3DMeshBuilder"        :  Widgetbutton5.Visible = True
       Widgetbutton6.BMPHandle = D3DFrame_bmp      :  Widgetbutton6.Hint = "D3DFrame"         :  Widgetbutton6.Visible = True
       Widgetbutton7.BMPHandle = D3DLight_bmp          :  Widgetbutton7.Hint = "D3DLight"             :  Widgetbutton7.Visible = True
       Widgetbutton8.BMPHandle = D3DTexture_bmp     :  Widgetbutton8.Hint = "D3DTextrue"        :  Widgetbutton8.Visible = True
       Widgetbutton9.BMPHandle = d3dVector_bmp   :  Widgetbutton9.Hint = "D3DVector"      :  Widgetbutton9.Visible = True
       Widgetbutton10.BMPHandle = D3DWrap_bmp   :  Widgetbutton10.Hint = "D3DWrap"      :  Widgetbutton10.Visible = True
       Widgetbutton11.Visible = False
       Widgetbutton12.Visible = False
       Widgetbutton13.Visible = False
       Widgetbutton14.Visible = False
       Widgetbutton15.Visible = False
       Widgetbutton16.Visible = False
       Widgetbutton17.Visible = False
       Widgetbutton18.Visible = False
       Widgetbutton19.Visible = False

      END SELECT
     END SUB





     SUB ManageTopPanel
      DEFINT ToolSpacer = 2
      DEFINT Rmargin = ToolSpacer, Tmargin = 0
      DEFINT MaxSpac = IIF(WidgetTab.Visible, TopPanel.Width - WidgetPanel.Width - 22, TopPanel.Width - 22)
      DEFINT maxHeight = IIF(WidgetTab.Visible, 58, 30)   'see how much height to work with
      TopPanel.Height = maxHeight

      IF  WidgetTab.Visible OR _
       FileToolPanel.Visible OR _
       EditToolPanel.Visible OR _
       CompileToolPanel.Visible OR _
       ViewToolPanel.Visible OR _
       CodeFoldingToolPanel.Visible OR _
       FormatToolPanel.Visible OR _
       BookMarkToolPanel.Visible OR _
       IconsetFlatButton.Visible THEN

       IDE.ViewTopPanel = False  :      mnuViewTopPanel_Click              'turn on top panel with toggle

       IF FileToolPanel.Visible THEN                                       'do these in left-right order starting with filetool
        FileToolPanel.Left = ToolSpacer
        FileToolPanel.Top = Tmargin
        Rmargin = FileToolPanel.Left + FileToolPanel.Width
       END IF

       IF EditToolPanel.Visible THEN
        IF (EditToolPanel.Width + Rmargin) > MaxSpac THEN
         Tmargin = 28
         Rmargin = 0                                                     'wrap down to next line
        END IF
        EditToolPanel.Top = Tmargin
        EditToolPanel.Left = ToolSpacer + Rmargin
        Rmargin = EditToolPanel.Left + EditToolPanel.Width
       END IF

       IF CompileToolPanel.Visible THEN
        IF (CompileToolPanel.Width + Rmargin) > MaxSpac THEN
         Tmargin = 28
         Rmargin = 0                                                     'wrap down to next line
        END IF
        CompileToolPanel.Top = Tmargin
        CompileToolPanel.Left = ToolSpacer + Rmargin
        Rmargin = CompileToolPanel.Left + CompileToolPanel.Width
       END IF

       IF ViewToolPanel.Visible THEN
        IF (ViewToolPanel.Width + Rmargin) > MaxSpac THEN
         Tmargin = 28
         Rmargin = 0                                                     'wrap down to next line
        END IF
        ViewToolPanel.Top = Tmargin
        ViewToolPanel.Left = ToolSpacer + Rmargin
        Rmargin = ViewToolPanel.Left + ViewToolPanel.Width
       END IF

       IF CodeFoldingToolPanel.Visible THEN
        IF (CodeFoldingToolPanel.Width + Rmargin) > MaxSpac THEN
         Tmargin = 28
         Rmargin = 0                                                     'wrap down to next line
        END IF
        CodeFoldingToolPanel.Top = Tmargin
        CodeFoldingToolPanel.Left = ToolSpacer + Rmargin
        Rmargin = CodeFoldingToolPanel.Left + CodeFoldingToolPanel.Width
       END IF

       IF FormatToolPanel.Visible THEN
        IF (FormatToolPanel.Width + Rmargin) > MaxSpac THEN
         Tmargin = 28
         Rmargin = 0                                                     'wrap down to next line
        END IF
        FormatToolPanel.Top = Tmargin
        FormatToolPanel.Left = ToolSpacer + Rmargin
        Rmargin = FormatToolPanel.Left + FormatToolPanel.Width
       END IF

       IF BookMarkToolPanel.Visible THEN
        IF (BookMarkToolPanel.Width + Rmargin) > MaxSpac THEN
         Tmargin = 28
         Rmargin = 0                                                     'wrap down to next line
        END IF
        BookMarkToolPanel.Top = Tmargin
        BookMarkToolPanel.Left = ToolSpacer + Rmargin
        Rmargin = BookMarkToolPanel.Left + BookMarkToolPanel.Width
       END IF

       IF IconsetFlatButton.Visible THEN
        IF (IconsetFlatButton.Width + Rmargin) > MaxSpac THEN
         Tmargin = 28
         Rmargin = 0                                                     'wrap down to next line
        END IF
        IconsetFlatButton.Top = Tmargin
        IconsetFlatButton.Left = ToolSpacer + Rmargin
       END IF

      ELSE

       IDE.ViewTopPanel = True  :      mnuViewTopPanel_Click              'turn off top panel, nothing to show

      END IF
      WidgetTab.Left = MainForm.ClientWidth - WidgetTab.Width -2

     END SUB

掌柜推荐
 
 
¥1,800.00 ·
 
 
¥489.00 ·
 
 
¥288.00 ·
 
 
¥908.00 ·
 
 
¥748.00 ·
 
 
¥264.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2010-12-07 21:18:03