Page 1 of 1

TreeGadget with 4 item states

Posted: Thu May 12, 2011 11:02 am
by Inf0Byt3
Maybe this code will be useful for someone. It's a sort of hack for the treegadget to make it show 4 states for the items: disabled, checked, unchecked and semi-checked. The states are handled automatically, but you must set the disabled and semi-selected states the by yourself as needed. Regarding the PB version you can compile this with, I used 4.60 beta to create it but it should also work in 4.51 (although this wasn't tested).

One of the greatest downsides of this code is that it doesn't allow you to to use both checkboxes and images as the checkboxes occupy the place where the icon would be. If any of the experts on the board have ideas on how to improve this, please let me know.

Image

Here comes the source (it's big because I added the state images at hex values in the datasection so there is no need to download anything else):

Code: Select all

;===============================================================
; Name:               4-state treegadget proof-of-concept
; Author:             Inf0byt3, parts by eddy / srod
; Date:               May 12, 2011
; Target compiler:    Purebasic 4.60 (and probably 4.51) 
; Target OS:          Win All
; License:            Free, unrestricted, no warranty
; Notes:              This code is basically a hack. One of
;                     its major downsizes is that you cannot
;                     add images to the items e.g. have both
;                     checkboxes and images on the same gadget.
;                     This is because the checkboxes in this
;                     example use the image slots of the items.
;===============================================================

Structure TreeFour
  Tree.i
  TreeID.i
  OldTreeProc.i
  TreeIcon_Disabled.i
  TreeIcon_Unchecked.i
  TreeIcon_Semichecked.i
  TreeIcon_Checked.i
EndStructure

Structure TreeFourItem
  Tree.i
  ItemNumber.i
  ItemID.i
  ItemState.i
EndStructure

Global NewList Trees.TreeFour()
Global NewList TreeItems.TreeFourItem()

Global HImageTree_Disabled = CatchImage(#PB_Any,?ImageTree_Disabled)
Global HImageTree_Unchecked = CatchImage(#PB_Any,?ImageTree_Unchecked)
Global HImageTree_Semichecked = CatchImage(#PB_Any,?ImageTree_Semichecked)
Global HImageTree_Checked = CatchImage(#PB_Any,?ImageTree_Checked)

;-----------------------------------------------------------------------

Procedure.i AddTreeIcon(TreeID.i,Image.i)
  ;http://forums.purebasic.com/english/viewtopic.php?f=12&t=10675
  ;by eddy / srod
  hItem=AddGadgetItem(TreeID,-1,"",Image)
  tvitem.TV_ITEM
  tvitem\hitem=hItem
  tvitem\mask=#TVIF_IMAGE
  SendMessage_(GadgetID(TreeID),#TVM_GETITEM,0,@tvitem)
  RemoveGadgetItem(TreeID,0) ;MADE THE CHANGE HERE!
  res=tvitem\iImage   
  ProcedureReturn res
EndProcedure

Procedure.i SetTreeIcon(TreeID.i,Index,IcoIndex.i)
  ;http://forums.purebasic.com/english/viewtopic.php?f=12&t=10675
  ;by eddy / srod
  hItem=GadgetItemID(TreeID,Index)
  txt.S=Space(1000)
  tvitem.TV_ITEM
  tvitem\hitem=hItem
  tvitem\psztext=@txt
  tvitem\cchTextMax = 1000
  tvitem\mask=#TVIF_TEXT|#TVIF_IMAGE|#TVIF_HANDLE|#TVIF_SELECTEDIMAGE
  SendMessage_(GadgetID(TreeID), #TVM_GETITEM,0,@tvitem)
  tvitem\iImage=IcoIndex
  tvitem\iSelectedImage=IcoIndex
  SendMessage_(GadgetID(TreeID), #TVM_SETITEM,0,@tvitem)     
EndProcedure 

;-----------------------------------------------------------------------

Procedure.i TreeExProc(hWnd.i, uMsg.i, wParam.i, lParam.i)

  ;{ Prepare
  Protected Result, HitTest.TV_HITTESTINFO, Item, ItemID, Gadget, OldProc, TreeIcon_Disabled, TreeIcon_Unchecked, TreeIcon_Semichecked, TreeIcon_Checked, TVItem.TV_ITEM
  ;}

  ;{ Get tree data
  ForEach Trees()
    If Trees()\TreeID = hWnd
      Gadget = Trees()\Tree
      OldProc = Trees()\OldTreeProc
      TreeIcon_Disabled = Trees()\TreeIcon_Disabled
      TreeIcon_Unchecked = Trees()\TreeIcon_Unchecked
      TreeIcon_Semichecked = Trees()\TreeIcon_Semichecked
      TreeIcon_Checked = Trees()\TreeIcon_Checked
      Break
    EndIf
  Next
  ;}

  Select uMsg

    Case #WM_LBUTTONDOWN,#WM_KEYDOWN ;{ Left click
      If uMsg = #WM_LBUTTONDOWN
        HitTest\pt\x = lParam&$FFFF
        HitTest\pt\y = (lParam>>16)&$FFFF
        If SendMessage_(hWnd,#TVM_HITTEST,0,HitTest)
          If HitTest\flags = #TVHT_ONITEMICON
            TVItem\mask = #TVIF_PARAM   
            TVItem\hItem = HitTest\hItem
            SendMessage_(hWnd,#TVM_GETITEM,0,TVItem)
            Item = TVItem\lParam
            ItemID = GadgetItemID(Gadget,Item)
          Else
            Result = CallWindowProc_(OldProc,hWnd,uMsg,wParam,lParam)
          EndIf
        EndIf
      ElseIf uMsg = #WM_KEYDOWN
        If wParam = #VK_SPACE
          Item = GetGadgetState(Gadget)
          ItemID = GadgetItemID(Gadget,Item)
        Else
          Result = CallWindowProc_(OldProc,hWnd,uMsg,wParam,lParam)
        EndIf
      EndIf
      ForEach TreeItems()
        If TreeItems()\ItemID = ItemID
          Select TreeItems()\ItemState
              
            Case 0 ;{ Disabled
              Result = CallWindowProc_(OldProc,hWnd,uMsg,wParam,lParam)
              ;}
              
            Case 1 ;{ Unchecked
              SetTreeIcon(Gadget,Item,TreeIcon_Checked)
              TreeItems()\ItemState = 3
              Result = CallWindowProc_(OldProc,hWnd,uMsg,wParam,lParam)
              ;}
 
            Case 3 ;{ Checked
              SetTreeIcon(Gadget,Item,TreeIcon_Unchecked)
              TreeItems()\ItemState = 1
              Result = CallWindowProc_(OldProc,hWnd,uMsg,wParam,lParam)
              ;}
              
            Case 2 ;{ Semichecked
              SetTreeIcon(Gadget,Item,TreeIcon_Unchecked)
              TreeItems()\ItemState = 1
              Result = CallWindowProc_(OldProc,hWnd,uMsg,wParam,lParam)
              ;}

          EndSelect
          Break
        EndIf
      Next
      ;}

    Default ;{ Other events
      Result = CallWindowProc_(OldProc,hWnd,uMsg,wParam,lParam)
      ;}

  EndSelect
  ProcedureReturn Result
EndProcedure

;-----------------------------------------------------------------------

Procedure.i TreeFour(Gadget.i,X.i,Y.i,W.i,H.i,Flags.i=0)
  Result = TreeGadget(Gadget,X,Y,W,H,Flags)
  If Result <> 0
    AddElement(Trees())
    Trees()\Tree = Gadget
    Trees()\TreeID = GadgetID(Gadget)
    Trees()\OldTreeProc = SetWindowLong_(Trees()\TreeID,#GWL_WNDPROC,@TreeExProc())
    Trees()\TreeIcon_Disabled = AddTreeIcon(Gadget,ImageID(HImageTree_Disabled))
    Trees()\TreeIcon_Unchecked = AddTreeIcon(Gadget,ImageID(HImageTree_Unchecked))
    Trees()\TreeIcon_Semichecked = AddTreeIcon(Gadget,ImageID(HImageTree_Semichecked))
    Trees()\TreeIcon_Checked = AddTreeIcon(Gadget,ImageID(HImageTree_Checked))
  EndIf
  ProcedureReturn Result
EndProcedure

Procedure.i TreeFourAddItem(Gadget.i,Position.i,Text.s,State.i=1,Level.i=0)
  If Position = -1
    DefinitivePosition = CountGadgetItems(Gadget)
  Else
    DefinitivePosition = Position
  EndIf
  ForEach Trees()
    If Trees()\Tree = Gadget
      TreeIcon_Disabled = Trees()\TreeIcon_Disabled
      TreeIcon_Unchecked = Trees()\TreeIcon_Unchecked
      TreeIcon_Semichecked = Trees()\TreeIcon_Semichecked
      TreeIcon_Checked = Trees()\TreeIcon_Checked
      Break
    EndIf
  Next
  Result = AddGadgetItem(Gadget,DefinitivePosition,Text,0,Level)
  If Result <> 0
    Select State
      Case 0 ;Disabled
        SetTreeIcon(Gadget,DefinitivePosition,TreeIcon_Disabled)
      Case 1 ;Unchecked
        SetTreeIcon(Gadget,DefinitivePosition,TreeIcon_Unchecked)
      Case 2 ;Semichecked
        SetTreeIcon(Gadget,DefinitivePosition,TreeIcon_Semichecked)
      Case 3 ;Checked
        SetTreeIcon(Gadget,DefinitivePosition,TreeIcon_Checked)
    EndSelect
    AddElement(TreeItems())
    TreeItems()\Tree = Gadget
    TreeItems()\ItemNumber = DefinitivePosition
    TreeItems()\ItemID = GadgetItemID(Gadget,DefinitivePosition)
    TreeItems()\ItemState = State
  EndIf
  ProcedureReturn Result
EndProcedure

Procedure.i SetTreeFourItemState(Gadget.i,Item.i,State.i)
  ItemID = GadgetItemID(Gadget,Item)
  ForEach Trees()
    If Trees()\Tree = Gadget
      TreeIcon_Disabled = Trees()\TreeIcon_Disabled
      TreeIcon_Unchecked = Trees()\TreeIcon_Unchecked
      TreeIcon_Semichecked = Trees()\TreeIcon_Semichecked
      TreeIcon_Checked = Trees()\TreeIcon_Checked
      ForEach TreeItems()
        If TreeItems()\ItemID = ItemID
          Select State
            Case 0 ;Disabled
              SetTreeIcon(Gadget,Item,TreeIcon_Disabled)
            Case 1 ;Unchecked
              SetTreeIcon(Gadget,Item,TreeIcon_Unchecked)
            Case 2 ;Semichecked
              SetTreeIcon(Gadget,Item,TreeIcon_Semichecked)
            Case 3 ;Checked
              SetTreeIcon(Gadget,Item,TreeIcon_Checked)
          EndSelect
          TreeItems()\ItemState = State
          Result = 1
          Break
        EndIf
      Next
      Break
    EndIf
  Next
  ProcedureReturn Result
EndProcedure

Procedure.i GetTreeFourItemState(Gadget.i,Item.i)
  ItemID = GadgetItemID(Gadget,Item)
  ForEach TreeItems()
    If TreeItems()\ItemID = ItemID
      Result = TreeItems()\ItemState
      Break
    EndIf
  Next
  ProcedureReturn Result
EndProcedure

;-----------------------------------------------------------------------

If OpenWindow(0, 0, 0, 350, 200, "TreeGadget with 4 item states", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  
  ;Add some gadgets
  TreeFour(0, 10, 10, 240, 180, #PB_Tree_AlwaysShowSelection)
  ButtonGadget(1,260,10,80,40,"Read state")
  ButtonGadget(2,260,60,80,40,"Change state")

  ;State : 0 disabled, 1 unchecked, 2 semichecked, 3 checked
  ;The semichecked and disabled state can be set with SetTreeFourItemState
  ;Read the state with GetTreeFourItemState
  TreeFourAddItem(0,0,"Disabled",0,0)
  TreeFourAddItem(0,1,"Unchecked",1,0)
  TreeFourAddItem(0,2,"Semichecked",2,0)
  TreeFourAddItem(0,3,"Checked",3,0)

  ;Event loop
  Repeat
    Event = WaitWindowEvent()
    Select Event
      Case #PB_Event_Gadget
        Select EventGadget()
          Case 1
            Debug GetTreeFourItemState(0,0)
            Debug GetTreeFourItemState(0,1)
            Debug GetTreeFourItemState(0,2)
            Debug GetTreeFourItemState(0,3)
            Debug "-------------------------"
          Case 2
            SetTreeFourItemState(0,0,Random(3))
            SetTreeFourItemState(0,1,Random(3))
            SetTreeFourItemState(0,2,Random(3))
            SetTreeFourItemState(0,3,Random(3))
        EndSelect
    EndSelect
  Until Event = #PB_Event_CloseWindow
 
 EndIf
 
 ;State images
 DataSection
   ImageTree_Disabled:
   Data.b 0, 0, 1, 0, 1, 0, 16, 16, 0, 0, 1, 0, 8, 0, 104, 5, 0, 0, 22, 0, 0, 0, 40, 0, 0, 0, 16, 0, 0, 0, 32, 0, 0, 0, 1, 0, 8, 0, 0, 0
   Data.b 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 189, 206, 206, 0, 255, 255, 255, 0, 0, 20, 112, 0, 0, 26
   Data.b 144, 0, 0, 32, 176, 0, 0, 38, 207, 0, 0, 44, 240, 0, 17, 61, 255, 0, 49, 87, 255, 0, 81, 113, 255, 0, 113, 139, 255, 0, 145, 165, 255, 0, 177, 191, 255, 0, 209, 218
   Data.b 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 26, 47, 0, 0, 45, 80, 0, 0, 63, 112, 0, 0, 81, 144, 0, 0, 99, 176, 0, 0, 118, 207, 0, 0, 136, 240, 0, 17, 152
   Data.b 255, 0, 49, 166, 255, 0, 81, 179, 255, 0, 113, 193, 255, 0, 145, 207, 255, 0, 177, 221, 255, 0, 209, 235, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 44, 47, 0, 0, 75
   Data.b 80, 0, 0, 104, 112, 0, 0, 134, 144, 0, 0, 165, 176, 0, 0, 195, 207, 0, 0, 225, 240, 0, 17, 239, 255, 0, 49, 241, 255, 0, 81, 243, 255, 0, 113, 245, 255, 0, 145, 247
   Data.b 255, 0, 177, 249, 255, 0, 209, 251, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 47, 33, 0, 0, 80, 55, 0, 0, 112, 76, 0, 0, 144, 99, 0, 0, 176, 121, 0, 0, 207
   Data.b 143, 0, 0, 240, 166, 0, 17, 255, 180, 0, 49, 255, 190, 0, 81, 255, 200, 0, 113, 255, 211, 0, 145, 255, 220, 0, 177, 255, 229, 0, 209, 255, 240, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 0, 47, 14, 0, 0, 80, 24, 0, 0, 112, 34, 0, 0, 144, 44, 0, 0, 176, 54, 0, 0, 207, 64, 0, 0, 240, 74, 0, 17, 255, 91, 0, 49, 255, 113, 0, 81, 255
   Data.b 135, 0, 113, 255, 157, 0, 145, 255, 178, 0, 177, 255, 201, 0, 209, 255, 223, 0, 255, 255, 255, 0, 0, 0, 0, 0, 2, 47, 0, 0, 4, 80, 0, 0, 6, 112, 0, 0, 8, 144
   Data.b 0, 0, 10, 176, 0, 0, 11, 207, 0, 0, 14, 240, 0, 0, 32, 255, 18, 0, 61, 255, 49, 0, 91, 255, 81, 0, 121, 255, 113, 0, 152, 255, 145, 0, 181, 255, 177, 0, 212, 255
   Data.b 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 20, 47, 0, 0, 34, 80, 0, 0, 48, 112, 0, 0, 61, 144, 0, 0, 76, 176, 0, 0, 89, 207, 0, 0, 103, 240, 0, 0, 120, 255
   Data.b 17, 0, 138, 255, 49, 0, 156, 255, 81, 0, 174, 255, 113, 0, 192, 255, 145, 0, 210, 255, 177, 0, 228, 255, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 38, 47, 0, 0, 64, 80
   Data.b 0, 0, 90, 112, 0, 0, 116, 144, 0, 0, 142, 176, 0, 0, 169, 207, 0, 0, 194, 240, 0, 0, 209, 255, 17, 0, 216, 255, 49, 0, 222, 255, 81, 0, 227, 255, 113, 0, 233, 255
   Data.b 145, 0, 239, 255, 177, 0, 246, 255, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 38, 0, 0, 80, 65, 0, 0, 112, 91, 0, 0, 144, 116, 0, 0, 176, 142, 0, 0, 207, 169
   Data.b 0, 0, 240, 195, 0, 0, 255, 210, 17, 0, 255, 216, 49, 0, 255, 221, 81, 0, 255, 228, 113, 0, 255, 234, 145, 0, 255, 240, 177, 0, 255, 246, 209, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 47, 20, 0, 0, 80, 34, 0, 0, 112, 48, 0, 0, 144, 62, 0, 0, 176, 77, 0, 0, 207, 91, 0, 0, 240, 105, 0, 0, 255, 121, 17, 0, 255, 138, 49, 0, 255, 157
   Data.b 81, 0, 255, 175, 113, 0, 255, 193, 145, 0, 255, 210, 177, 0, 255, 229, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 3, 0, 0, 80, 4, 0, 0, 112, 6, 0, 0, 144, 9
   Data.b 0, 0, 176, 10, 0, 0, 207, 12, 0, 0, 240, 14, 0, 0, 255, 32, 18, 0, 255, 62, 49, 0, 255, 92, 81, 0, 255, 122, 113, 0, 255, 151, 145, 0, 255, 182, 177, 0, 255, 212
   Data.b 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 0, 14, 0, 80, 0, 23, 0, 112, 0, 33, 0, 144, 0, 43, 0, 176, 0, 54, 0, 207, 0, 64, 0, 240, 0, 73, 0, 255, 17
   Data.b 90, 0, 255, 49, 112, 0, 255, 81, 134, 0, 255, 113, 156, 0, 255, 145, 178, 0, 255, 177, 200, 0, 255, 209, 223, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 0, 32, 0, 80, 0
   Data.b 54, 0, 112, 0, 76, 0, 144, 0, 98, 0, 176, 0, 120, 0, 207, 0, 142, 0, 240, 0, 164, 0, 255, 17, 179, 0, 255, 49, 190, 0, 255, 81, 199, 0, 255, 113, 209, 0, 255, 145
   Data.b 220, 0, 255, 177, 229, 0, 255, 209, 240, 0, 255, 255, 255, 0, 0, 0, 0, 0, 44, 0, 47, 0, 75, 0, 80, 0, 105, 0, 112, 0, 135, 0, 144, 0, 165, 0, 176, 0, 196, 0
   Data.b 207, 0, 225, 0, 240, 0, 240, 17, 255, 0, 242, 49, 255, 0, 244, 81, 255, 0, 246, 113, 255, 0, 247, 145, 255, 0, 249, 177, 255, 0, 251, 209, 255, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 27, 0, 47, 0, 45, 0, 80, 0, 63, 0, 112, 0, 82, 0, 144, 0, 99, 0, 176, 0, 118, 0, 207, 0, 136, 0, 240, 0, 153, 17, 255, 0, 166, 49, 255, 0, 180, 81
   Data.b 255, 0, 194, 113, 255, 0, 207, 145, 255, 0, 220, 177, 255, 0, 235, 209, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 8, 0, 47, 0, 14, 0, 80, 0, 21, 0, 112, 0, 27, 0
   Data.b 144, 0, 33, 0, 176, 0, 38, 0, 207, 0, 44, 0, 240, 0, 62, 17, 255, 0, 88, 49, 255, 0, 113, 81, 255, 0, 140, 113, 255, 0, 166, 145, 255, 0, 191, 177, 255, 0, 218, 209
   Data.b 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
   Data.b 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2
   Data.b 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 1, 0, 0, 0, 1
   Data.b 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 1, 2, 2, 2, 1, 1
   Data.b 1, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 0, 0, 0, 1
   Data.b 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0, 0, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1
   Data.b 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3
   Data.b 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3
   Data.b 0, 0, 255, 255, 0, 0
   ImageTree_Unchecked:
   Data.b 0, 0, 1, 0, 1, 0, 16, 16, 0, 0, 1, 0, 8, 0, 104, 5, 0, 0, 22, 0, 0, 0, 40, 0, 0, 0, 16, 0, 0, 0, 32, 0, 0, 0, 1, 0, 8, 0, 0, 0
   Data.b 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 128, 0, 0, 214, 222, 222, 0, 222, 222, 222, 0, 222, 231
   Data.b 231, 0, 231, 231, 231, 0, 231, 239, 239, 0, 239, 239, 239, 0, 247, 247, 247, 0, 255, 255, 255, 0, 81, 113, 255, 0, 113, 139, 255, 0, 145, 165, 255, 0, 177, 191, 255, 0, 209, 218
   Data.b 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 26, 47, 0, 0, 45, 80, 0, 0, 63, 112, 0, 0, 81, 144, 0, 0, 99, 176, 0, 0, 118, 207, 0, 0, 136, 240, 0, 17, 152
   Data.b 255, 0, 49, 166, 255, 0, 81, 179, 255, 0, 113, 193, 255, 0, 145, 207, 255, 0, 177, 221, 255, 0, 209, 235, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 44, 47, 0, 0, 75
   Data.b 80, 0, 0, 104, 112, 0, 0, 134, 144, 0, 0, 165, 176, 0, 0, 195, 207, 0, 0, 225, 240, 0, 17, 239, 255, 0, 49, 241, 255, 0, 81, 243, 255, 0, 113, 245, 255, 0, 145, 247
   Data.b 255, 0, 177, 249, 255, 0, 209, 251, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 47, 33, 0, 0, 80, 55, 0, 0, 112, 76, 0, 0, 144, 99, 0, 0, 176, 121, 0, 0, 207
   Data.b 143, 0, 0, 240, 166, 0, 17, 255, 180, 0, 49, 255, 190, 0, 81, 255, 200, 0, 113, 255, 211, 0, 145, 255, 220, 0, 177, 255, 229, 0, 209, 255, 240, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 0, 47, 14, 0, 0, 80, 24, 0, 0, 112, 34, 0, 0, 144, 44, 0, 0, 176, 54, 0, 0, 207, 64, 0, 0, 240, 74, 0, 17, 255, 91, 0, 49, 255, 113, 0, 81, 255
   Data.b 135, 0, 113, 255, 157, 0, 145, 255, 178, 0, 177, 255, 201, 0, 209, 255, 223, 0, 255, 255, 255, 0, 0, 0, 0, 0, 2, 47, 0, 0, 4, 80, 0, 0, 6, 112, 0, 0, 8, 144
   Data.b 0, 0, 10, 176, 0, 0, 11, 207, 0, 0, 14, 240, 0, 0, 32, 255, 18, 0, 61, 255, 49, 0, 91, 255, 81, 0, 121, 255, 113, 0, 152, 255, 145, 0, 181, 255, 177, 0, 212, 255
   Data.b 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 20, 47, 0, 0, 34, 80, 0, 0, 48, 112, 0, 0, 61, 144, 0, 0, 76, 176, 0, 0, 89, 207, 0, 0, 103, 240, 0, 0, 120, 255
   Data.b 17, 0, 138, 255, 49, 0, 156, 255, 81, 0, 174, 255, 113, 0, 192, 255, 145, 0, 210, 255, 177, 0, 228, 255, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 38, 47, 0, 0, 64, 80
   Data.b 0, 0, 90, 112, 0, 0, 116, 144, 0, 0, 142, 176, 0, 0, 169, 207, 0, 0, 194, 240, 0, 0, 209, 255, 17, 0, 216, 255, 49, 0, 222, 255, 81, 0, 227, 255, 113, 0, 233, 255
   Data.b 145, 0, 239, 255, 177, 0, 246, 255, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 38, 0, 0, 80, 65, 0, 0, 112, 91, 0, 0, 144, 116, 0, 0, 176, 142, 0, 0, 207, 169
   Data.b 0, 0, 240, 195, 0, 0, 255, 210, 17, 0, 255, 216, 49, 0, 255, 221, 81, 0, 255, 228, 113, 0, 255, 234, 145, 0, 255, 240, 177, 0, 255, 246, 209, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 47, 20, 0, 0, 80, 34, 0, 0, 112, 48, 0, 0, 144, 62, 0, 0, 176, 77, 0, 0, 207, 91, 0, 0, 240, 105, 0, 0, 255, 121, 17, 0, 255, 138, 49, 0, 255, 157
   Data.b 81, 0, 255, 175, 113, 0, 255, 193, 145, 0, 255, 210, 177, 0, 255, 229, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 3, 0, 0, 80, 4, 0, 0, 112, 6, 0, 0, 144, 9
   Data.b 0, 0, 176, 10, 0, 0, 207, 12, 0, 0, 240, 14, 0, 0, 255, 32, 18, 0, 255, 62, 49, 0, 255, 92, 81, 0, 255, 122, 113, 0, 255, 151, 145, 0, 255, 182, 177, 0, 255, 212
   Data.b 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 0, 14, 0, 80, 0, 23, 0, 112, 0, 33, 0, 144, 0, 43, 0, 176, 0, 54, 0, 207, 0, 64, 0, 240, 0, 73, 0, 255, 17
   Data.b 90, 0, 255, 49, 112, 0, 255, 81, 134, 0, 255, 113, 156, 0, 255, 145, 178, 0, 255, 177, 200, 0, 255, 209, 223, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 0, 32, 0, 80, 0
   Data.b 54, 0, 112, 0, 76, 0, 144, 0, 98, 0, 176, 0, 120, 0, 207, 0, 142, 0, 240, 0, 164, 0, 255, 17, 179, 0, 255, 49, 190, 0, 255, 81, 199, 0, 255, 113, 209, 0, 255, 145
   Data.b 220, 0, 255, 177, 229, 0, 255, 209, 240, 0, 255, 255, 255, 0, 0, 0, 0, 0, 44, 0, 47, 0, 75, 0, 80, 0, 105, 0, 112, 0, 135, 0, 144, 0, 165, 0, 176, 0, 196, 0
   Data.b 207, 0, 225, 0, 240, 0, 240, 17, 255, 0, 242, 49, 255, 0, 244, 81, 255, 0, 246, 113, 255, 0, 247, 145, 255, 0, 249, 177, 255, 0, 251, 209, 255, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 27, 0, 47, 0, 45, 0, 80, 0, 63, 0, 112, 0, 82, 0, 144, 0, 99, 0, 176, 0, 118, 0, 207, 0, 136, 0, 240, 0, 153, 17, 255, 0, 166, 49, 255, 0, 180, 81
   Data.b 255, 0, 194, 113, 255, 0, 207, 145, 255, 0, 220, 177, 255, 0, 235, 209, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 8, 0, 47, 0, 14, 0, 80, 0, 21, 0, 112, 0, 27, 0
   Data.b 144, 0, 33, 0, 176, 0, 38, 0, 207, 0, 44, 0, 240, 0, 62, 17, 255, 0, 88, 49, 255, 0, 113, 81, 255, 0, 140, 113, 255, 0, 166, 145, 255, 0, 191, 177, 255, 0, 218, 209
   Data.b 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
   Data.b 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 9, 1, 0, 0, 0, 1, 7, 7, 7, 8, 8, 8, 8, 9
   Data.b 9, 9, 9, 1, 0, 0, 0, 1, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 1, 0, 0, 0, 1, 5, 6, 7, 7, 7, 8, 8, 8, 8, 9, 9, 1, 0, 0, 0, 1
   Data.b 4, 5, 6, 7, 7, 7, 8, 8, 8, 8, 9, 1, 0, 0, 0, 1, 3, 4, 5, 6, 7, 7, 7, 8, 8, 8, 8, 1, 0, 0, 0, 1, 3, 3, 4, 5, 6, 7, 7, 7
   Data.b 8, 8, 8, 1, 0, 0, 0, 1, 2, 3, 3, 4, 5, 6, 7, 7, 7, 8, 8, 1, 0, 0, 0, 1, 2, 2, 3, 3, 4, 5, 6, 7, 7, 7, 8, 1, 0, 0, 0, 1
   Data.b 2, 2, 2, 3, 3, 4, 5, 6, 7, 7, 7, 1, 0, 0, 0, 1, 2, 2, 2, 2, 3, 3, 4, 5, 6, 7, 7, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1
   Data.b 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3
   Data.b 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3
   Data.b 0, 0, 255, 255, 0, 0
   ImageTree_Semichecked:
   Data.b 0, 0, 1, 0, 1, 0, 16, 16, 0, 0, 1, 0, 8, 0, 104, 5, 0, 0, 22, 0, 0, 0, 40, 0, 0, 0, 16, 0, 0, 0, 32, 0, 0, 0, 1, 0, 8, 0, 0, 0
   Data.b 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 132, 132, 0, 189, 206, 206, 0, 0, 20, 112, 0, 0, 26
   Data.b 144, 0, 0, 32, 176, 0, 0, 38, 207, 0, 0, 44, 240, 0, 17, 61, 255, 0, 49, 87, 255, 0, 81, 113, 255, 0, 113, 139, 255, 0, 145, 165, 255, 0, 177, 191, 255, 0, 209, 218
   Data.b 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 26, 47, 0, 0, 45, 80, 0, 0, 63, 112, 0, 0, 81, 144, 0, 0, 99, 176, 0, 0, 118, 207, 0, 0, 136, 240, 0, 17, 152
   Data.b 255, 0, 49, 166, 255, 0, 81, 179, 255, 0, 113, 193, 255, 0, 145, 207, 255, 0, 177, 221, 255, 0, 209, 235, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 44, 47, 0, 0, 75
   Data.b 80, 0, 0, 104, 112, 0, 0, 134, 144, 0, 0, 165, 176, 0, 0, 195, 207, 0, 0, 225, 240, 0, 17, 239, 255, 0, 49, 241, 255, 0, 81, 243, 255, 0, 113, 245, 255, 0, 145, 247
   Data.b 255, 0, 177, 249, 255, 0, 209, 251, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 47, 33, 0, 0, 80, 55, 0, 0, 112, 76, 0, 0, 144, 99, 0, 0, 176, 121, 0, 0, 207
   Data.b 143, 0, 0, 240, 166, 0, 17, 255, 180, 0, 49, 255, 190, 0, 81, 255, 200, 0, 113, 255, 211, 0, 145, 255, 220, 0, 177, 255, 229, 0, 209, 255, 240, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 0, 47, 14, 0, 0, 80, 24, 0, 0, 112, 34, 0, 0, 144, 44, 0, 0, 176, 54, 0, 0, 207, 64, 0, 0, 240, 74, 0, 17, 255, 91, 0, 49, 255, 113, 0, 81, 255
   Data.b 135, 0, 113, 255, 157, 0, 145, 255, 178, 0, 177, 255, 201, 0, 209, 255, 223, 0, 255, 255, 255, 0, 0, 0, 0, 0, 2, 47, 0, 0, 4, 80, 0, 0, 6, 112, 0, 0, 8, 144
   Data.b 0, 0, 10, 176, 0, 0, 11, 207, 0, 0, 14, 240, 0, 0, 32, 255, 18, 0, 61, 255, 49, 0, 91, 255, 81, 0, 121, 255, 113, 0, 152, 255, 145, 0, 181, 255, 177, 0, 212, 255
   Data.b 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 20, 47, 0, 0, 34, 80, 0, 0, 48, 112, 0, 0, 61, 144, 0, 0, 76, 176, 0, 0, 89, 207, 0, 0, 103, 240, 0, 0, 120, 255
   Data.b 17, 0, 138, 255, 49, 0, 156, 255, 81, 0, 174, 255, 113, 0, 192, 255, 145, 0, 210, 255, 177, 0, 228, 255, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 38, 47, 0, 0, 64, 80
   Data.b 0, 0, 90, 112, 0, 0, 116, 144, 0, 0, 142, 176, 0, 0, 169, 207, 0, 0, 194, 240, 0, 0, 209, 255, 17, 0, 216, 255, 49, 0, 222, 255, 81, 0, 227, 255, 113, 0, 233, 255
   Data.b 145, 0, 239, 255, 177, 0, 246, 255, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 38, 0, 0, 80, 65, 0, 0, 112, 91, 0, 0, 144, 116, 0, 0, 176, 142, 0, 0, 207, 169
   Data.b 0, 0, 240, 195, 0, 0, 255, 210, 17, 0, 255, 216, 49, 0, 255, 221, 81, 0, 255, 228, 113, 0, 255, 234, 145, 0, 255, 240, 177, 0, 255, 246, 209, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 47, 20, 0, 0, 80, 34, 0, 0, 112, 48, 0, 0, 144, 62, 0, 0, 176, 77, 0, 0, 207, 91, 0, 0, 240, 105, 0, 0, 255, 121, 17, 0, 255, 138, 49, 0, 255, 157
   Data.b 81, 0, 255, 175, 113, 0, 255, 193, 145, 0, 255, 210, 177, 0, 255, 229, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 3, 0, 0, 80, 4, 0, 0, 112, 6, 0, 0, 144, 9
   Data.b 0, 0, 176, 10, 0, 0, 207, 12, 0, 0, 240, 14, 0, 0, 255, 32, 18, 0, 255, 62, 49, 0, 255, 92, 81, 0, 255, 122, 113, 0, 255, 151, 145, 0, 255, 182, 177, 0, 255, 212
   Data.b 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 0, 14, 0, 80, 0, 23, 0, 112, 0, 33, 0, 144, 0, 43, 0, 176, 0, 54, 0, 207, 0, 64, 0, 240, 0, 73, 0, 255, 17
   Data.b 90, 0, 255, 49, 112, 0, 255, 81, 134, 0, 255, 113, 156, 0, 255, 145, 178, 0, 255, 177, 200, 0, 255, 209, 223, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 0, 32, 0, 80, 0
   Data.b 54, 0, 112, 0, 76, 0, 144, 0, 98, 0, 176, 0, 120, 0, 207, 0, 142, 0, 240, 0, 164, 0, 255, 17, 179, 0, 255, 49, 190, 0, 255, 81, 199, 0, 255, 113, 209, 0, 255, 145
   Data.b 220, 0, 255, 177, 229, 0, 255, 209, 240, 0, 255, 255, 255, 0, 0, 0, 0, 0, 44, 0, 47, 0, 75, 0, 80, 0, 105, 0, 112, 0, 135, 0, 144, 0, 165, 0, 176, 0, 196, 0
   Data.b 207, 0, 225, 0, 240, 0, 240, 17, 255, 0, 242, 49, 255, 0, 244, 81, 255, 0, 246, 113, 255, 0, 247, 145, 255, 0, 249, 177, 255, 0, 251, 209, 255, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 27, 0, 47, 0, 45, 0, 80, 0, 63, 0, 112, 0, 82, 0, 144, 0, 99, 0, 176, 0, 118, 0, 207, 0, 136, 0, 240, 0, 153, 17, 255, 0, 166, 49, 255, 0, 180, 81
   Data.b 255, 0, 194, 113, 255, 0, 207, 145, 255, 0, 220, 177, 255, 0, 235, 209, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 8, 0, 47, 0, 14, 0, 80, 0, 21, 0, 112, 0, 27, 0
   Data.b 144, 0, 33, 0, 176, 0, 38, 0, 207, 0, 44, 0, 240, 0, 62, 17, 255, 0, 88, 49, 255, 0, 113, 81, 255, 0, 140, 113, 255, 0, 166, 145, 255, 0, 191, 177, 255, 0, 218, 209
   Data.b 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2
   Data.b 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1
   Data.b 1, 1, 1, 2, 0, 0, 0, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 0, 0, 0, 2
   Data.b 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 0, 0, 0, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 0, 0, 0, 2, 1, 1, 2, 1, 1, 1, 2, 2
   Data.b 2, 1, 1, 2, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 0, 0, 0, 2
   Data.b 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2
   Data.b 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3
   Data.b 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3
   Data.b 0, 0, 255, 255, 0, 0
   ImageTree_Checked:
   Data.b 0, 0, 1, 0, 1, 0, 16, 16, 0, 0, 1, 0, 8, 0, 104, 5, 0, 0, 22, 0, 0, 0, 40, 0, 0, 0, 16, 0, 0, 0, 32, 0, 0, 0, 1, 0, 8, 0, 0, 0
   Data.b 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 165, 33, 0, 128, 128, 0, 0, 222, 222, 222, 0, 222, 231
   Data.b 231, 0, 231, 231, 231, 0, 231, 239, 239, 0, 239, 239, 239, 0, 239, 247, 247, 0, 247, 247, 247, 0, 255, 255, 255, 0, 113, 139, 255, 0, 145, 165, 255, 0, 177, 191, 255, 0, 209, 218
   Data.b 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 26, 47, 0, 0, 45, 80, 0, 0, 63, 112, 0, 0, 81, 144, 0, 0, 99, 176, 0, 0, 118, 207, 0, 0, 136, 240, 0, 17, 152
   Data.b 255, 0, 49, 166, 255, 0, 81, 179, 255, 0, 113, 193, 255, 0, 145, 207, 255, 0, 177, 221, 255, 0, 209, 235, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 44, 47, 0, 0, 75
   Data.b 80, 0, 0, 104, 112, 0, 0, 134, 144, 0, 0, 165, 176, 0, 0, 195, 207, 0, 0, 225, 240, 0, 17, 239, 255, 0, 49, 241, 255, 0, 81, 243, 255, 0, 113, 245, 255, 0, 145, 247
   Data.b 255, 0, 177, 249, 255, 0, 209, 251, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 47, 33, 0, 0, 80, 55, 0, 0, 112, 76, 0, 0, 144, 99, 0, 0, 176, 121, 0, 0, 207
   Data.b 143, 0, 0, 240, 166, 0, 17, 255, 180, 0, 49, 255, 190, 0, 81, 255, 200, 0, 113, 255, 211, 0, 145, 255, 220, 0, 177, 255, 229, 0, 209, 255, 240, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 0, 47, 14, 0, 0, 80, 24, 0, 0, 112, 34, 0, 0, 144, 44, 0, 0, 176, 54, 0, 0, 207, 64, 0, 0, 240, 74, 0, 17, 255, 91, 0, 49, 255, 113, 0, 81, 255
   Data.b 135, 0, 113, 255, 157, 0, 145, 255, 178, 0, 177, 255, 201, 0, 209, 255, 223, 0, 255, 255, 255, 0, 0, 0, 0, 0, 2, 47, 0, 0, 4, 80, 0, 0, 6, 112, 0, 0, 8, 144
   Data.b 0, 0, 10, 176, 0, 0, 11, 207, 0, 0, 14, 240, 0, 0, 32, 255, 18, 0, 61, 255, 49, 0, 91, 255, 81, 0, 121, 255, 113, 0, 152, 255, 145, 0, 181, 255, 177, 0, 212, 255
   Data.b 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 20, 47, 0, 0, 34, 80, 0, 0, 48, 112, 0, 0, 61, 144, 0, 0, 76, 176, 0, 0, 89, 207, 0, 0, 103, 240, 0, 0, 120, 255
   Data.b 17, 0, 138, 255, 49, 0, 156, 255, 81, 0, 174, 255, 113, 0, 192, 255, 145, 0, 210, 255, 177, 0, 228, 255, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 38, 47, 0, 0, 64, 80
   Data.b 0, 0, 90, 112, 0, 0, 116, 144, 0, 0, 142, 176, 0, 0, 169, 207, 0, 0, 194, 240, 0, 0, 209, 255, 17, 0, 216, 255, 49, 0, 222, 255, 81, 0, 227, 255, 113, 0, 233, 255
   Data.b 145, 0, 239, 255, 177, 0, 246, 255, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 38, 0, 0, 80, 65, 0, 0, 112, 91, 0, 0, 144, 116, 0, 0, 176, 142, 0, 0, 207, 169
   Data.b 0, 0, 240, 195, 0, 0, 255, 210, 17, 0, 255, 216, 49, 0, 255, 221, 81, 0, 255, 228, 113, 0, 255, 234, 145, 0, 255, 240, 177, 0, 255, 246, 209, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 47, 20, 0, 0, 80, 34, 0, 0, 112, 48, 0, 0, 144, 62, 0, 0, 176, 77, 0, 0, 207, 91, 0, 0, 240, 105, 0, 0, 255, 121, 17, 0, 255, 138, 49, 0, 255, 157
   Data.b 81, 0, 255, 175, 113, 0, 255, 193, 145, 0, 255, 210, 177, 0, 255, 229, 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 3, 0, 0, 80, 4, 0, 0, 112, 6, 0, 0, 144, 9
   Data.b 0, 0, 176, 10, 0, 0, 207, 12, 0, 0, 240, 14, 0, 0, 255, 32, 18, 0, 255, 62, 49, 0, 255, 92, 81, 0, 255, 122, 113, 0, 255, 151, 145, 0, 255, 182, 177, 0, 255, 212
   Data.b 209, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 0, 14, 0, 80, 0, 23, 0, 112, 0, 33, 0, 144, 0, 43, 0, 176, 0, 54, 0, 207, 0, 64, 0, 240, 0, 73, 0, 255, 17
   Data.b 90, 0, 255, 49, 112, 0, 255, 81, 134, 0, 255, 113, 156, 0, 255, 145, 178, 0, 255, 177, 200, 0, 255, 209, 223, 0, 255, 255, 255, 0, 0, 0, 0, 0, 47, 0, 32, 0, 80, 0
   Data.b 54, 0, 112, 0, 76, 0, 144, 0, 98, 0, 176, 0, 120, 0, 207, 0, 142, 0, 240, 0, 164, 0, 255, 17, 179, 0, 255, 49, 190, 0, 255, 81, 199, 0, 255, 113, 209, 0, 255, 145
   Data.b 220, 0, 255, 177, 229, 0, 255, 209, 240, 0, 255, 255, 255, 0, 0, 0, 0, 0, 44, 0, 47, 0, 75, 0, 80, 0, 105, 0, 112, 0, 135, 0, 144, 0, 165, 0, 176, 0, 196, 0
   Data.b 207, 0, 225, 0, 240, 0, 240, 17, 255, 0, 242, 49, 255, 0, 244, 81, 255, 0, 246, 113, 255, 0, 247, 145, 255, 0, 249, 177, 255, 0, 251, 209, 255, 0, 255, 255, 255, 0, 0, 0
   Data.b 0, 0, 27, 0, 47, 0, 45, 0, 80, 0, 63, 0, 112, 0, 82, 0, 144, 0, 99, 0, 176, 0, 118, 0, 207, 0, 136, 0, 240, 0, 153, 17, 255, 0, 166, 49, 255, 0, 180, 81
   Data.b 255, 0, 194, 113, 255, 0, 207, 145, 255, 0, 220, 177, 255, 0, 235, 209, 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 8, 0, 47, 0, 14, 0, 80, 0, 21, 0, 112, 0, 27, 0
   Data.b 144, 0, 33, 0, 176, 0, 38, 0, 207, 0, 44, 0, 240, 0, 62, 17, 255, 0, 88, 49, 255, 0, 113, 81, 255, 0, 140, 113, 255, 0, 166, 145, 255, 0, 191, 177, 255, 0, 218, 209
   Data.b 255, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2
   Data.b 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 7, 8, 9, 9, 9, 10, 10, 10, 10, 10, 10, 2, 0, 0, 0, 2, 7, 7, 8, 9, 9, 9, 10, 10
   Data.b 10, 10, 10, 2, 0, 0, 0, 2, 7, 7, 7, 8, 1, 9, 9, 10, 10, 10, 10, 2, 0, 0, 0, 2, 6, 7, 7, 1, 1, 1, 9, 9, 10, 10, 10, 2, 0, 0, 0, 2
   Data.b 5, 6, 1, 1, 1, 1, 1, 9, 9, 10, 10, 2, 0, 0, 0, 2, 5, 5, 1, 1, 7, 1, 1, 1, 9, 9, 10, 2, 0, 0, 0, 2, 4, 5, 1, 6, 7, 7, 1, 1
   Data.b 1, 9, 9, 2, 0, 0, 0, 2, 4, 4, 5, 5, 6, 7, 7, 1, 1, 9, 9, 2, 0, 0, 0, 2, 3, 4, 4, 5, 5, 6, 7, 7, 1, 8, 9, 2, 0, 0, 0, 2
   Data.b 3, 3, 4, 4, 5, 5, 6, 7, 7, 7, 8, 2, 0, 0, 0, 2, 3, 3, 3, 4, 4, 5, 5, 6, 7, 7, 7, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2
   Data.b 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 0, 0, 255, 255, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3
   Data.b 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3, 0, 0, 128, 3
   Data.b 0, 0, 255, 255, 0, 0
 EndDataSection
P.S. Netmaestro I took the liberty to copy the header style from one of your sources... That's probably the only correct part of this code :P.

[Edit]
Added a screenshot.

Re: TreeGadget with 4 item states

Posted: Fri May 13, 2011 1:16 pm
by Kwai chang caine
Thanks for sharing 8)

Re: TreeGadget with 4 item states

Posted: Fri May 13, 2011 1:59 pm
by eesau
This is very nice, thanks!