mirror of
https://github.com/FellippeHeitor/InForm.git
synced 2025-01-14 11:39:33 +00:00
Move theme image data to use QB64-PE memory image load functionality
This commit is contained in:
parent
347b7e07fe
commit
79d319ee77
7 changed files with 346 additions and 1173 deletions
|
@ -25,6 +25,27 @@ $IF WIN THEN
|
|||
CONST __UI_SM_SWAPBUTTON = 23
|
||||
$END IF
|
||||
|
||||
' InForm theme image IDs
|
||||
CONST __INFORM_THEME_IMAGE_ARROWS~%% = 1~%%
|
||||
CONST __INFORM_THEME_IMAGE_BUTTON~%% = 2~%%
|
||||
CONST __INFORM_THEME_IMAGE_CHECKBOX~%% = 3~%%
|
||||
CONST __INFORM_THEME_IMAGE_FRAME~%% = 4~%%
|
||||
CONST __INFORM_THEME_IMAGE_MENUCHECKMARK~%% = 5~%%
|
||||
CONST __INFORM_THEME_IMAGE_NOTFOUND~%% = 6~%%
|
||||
CONST __INFORM_THEME_IMAGE_PROGRESSCHUNK~%% = 7~%%
|
||||
CONST __INFORM_THEME_IMAGE_PROGRESSTRACK~%% = 8~%%
|
||||
CONST __INFORM_THEME_IMAGE_RADIOBUTTON~%% = 9~%%
|
||||
CONST __INFORM_THEME_IMAGE_SCROLLBUTTONS~%% = 10~%%
|
||||
CONST __INFORM_THEME_IMAGE_SCROLLHBUTTONS~%% = 11~%%
|
||||
CONST __INFORM_THEME_IMAGE_SCROLLHTHUMB~%% = 12~%%
|
||||
CONST __INFORM_THEME_IMAGE_SCROLLHTRACK~%% = 13~%%
|
||||
CONST __INFORM_THEME_IMAGE_SCROLLTHUMB~%% = 14~%%
|
||||
CONST __INFORM_THEME_IMAGE_SCROLLTRACK~%% = 15~%%
|
||||
CONST __INFORM_THEME_IMAGE_SLIDERDOWN~%% = 16~%%
|
||||
CONST __INFORM_THEME_IMAGE_SLIDERTRACK~%% = 17~%%
|
||||
|
||||
'$INCLUDE:'extensions/HashTable.bi'
|
||||
|
||||
$SCREENHIDE
|
||||
_CONTROLCHR OFF
|
||||
|
||||
|
@ -140,11 +161,6 @@ TYPE __UI_Types
|
|||
RestrictResize AS _BYTE
|
||||
END TYPE
|
||||
|
||||
TYPE __UI_ThemeImagesType
|
||||
FileName AS STRING * 32
|
||||
Handle AS LONG
|
||||
END TYPE
|
||||
|
||||
TYPE __UI_WordWrapHistoryType
|
||||
StringSlot AS LONG
|
||||
Width AS INTEGER
|
||||
|
@ -169,7 +185,7 @@ REDIM SHARED ToolTip(0 TO 100) AS STRING
|
|||
REDIM SHARED __UI_TempTips(0 TO 100) AS STRING
|
||||
REDIM SHARED Control(0 TO 100) AS __UI_ControlTYPE
|
||||
REDIM SHARED ControlDrawOrder(0) AS LONG
|
||||
REDIM SHARED __UI_ThemeImages(0 TO 100) AS __UI_ThemeImagesType
|
||||
REDIM __UI_ThemeImages(0 TO 0) AS HashTableType
|
||||
REDIM SHARED __UI_WordWrapHistoryTexts(0 TO 100) AS STRING
|
||||
REDIM SHARED __UI_WordWrapHistoryResults(0 TO 100) AS STRING
|
||||
REDIM SHARED __UI_WordWrapHistory(0 TO 100) AS __UI_WordWrapHistoryType
|
||||
|
@ -344,3 +360,6 @@ SYSTEM
|
|||
|
||||
__UI_ErrorHandler:
|
||||
RESUME NEXT
|
||||
|
||||
'$INCLUDE:'extensions/Base64.bas'
|
||||
'$INCLUDE:'extensions/HashTable.bas'
|
||||
|
|
|
@ -5085,7 +5085,7 @@ SUB LoadImage (This AS __UI_ControlTYPE, File$)
|
|||
END IF
|
||||
|
||||
IF LEN(ErrorMessage$) THEN
|
||||
IF NotFoundImage = 0 THEN NotFoundImage = __UI_LoadThemeImage("notfound.png")
|
||||
IF NotFoundImage = 0 THEN NotFoundImage = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_NOTFOUND)
|
||||
|
||||
PrevDest = _DEST
|
||||
This.HelperCanvas = _NEWIMAGE(This.Width, This.Height, 32)
|
||||
|
@ -5146,57 +5146,24 @@ SUB __UI_ClearHelperCanvasColor (This AS __UI_ControlTYPE, Left AS INTEGER, Top
|
|||
END SUB
|
||||
|
||||
'---------------------------------------------------------------------------------
|
||||
FUNCTION __UI_LoadThemeImage& (FileName$)
|
||||
'Contains portions of Dav's BIN2BAS
|
||||
'http://www.qbasicnews.com/dav/qb64.php
|
||||
FUNCTION __UI_LoadThemeImage& (id AS _UNSIGNED _BYTE)
|
||||
SHARED __UI_ThemeImages() AS HashTableType
|
||||
|
||||
DIM A$, i&, B$, C%, F$, C$, t%, B&, X$, btemp$, BASFILE$
|
||||
DIM MemoryBlock AS _MEM, TempImage AS LONG, NextSlot AS LONG
|
||||
DIM NewWidth AS INTEGER, NewHeight AS INTEGER
|
||||
|
||||
'Check if this FileName$ has already been loaded
|
||||
FOR NextSlot = 1 TO UBOUND(__UI_ThemeImages)
|
||||
IF UCASE$(RTRIM$(__UI_ThemeImages(NextSlot).FileName)) = UCASE$(FileName$) THEN
|
||||
__UI_LoadThemeImage& = __UI_ThemeImages(NextSlot).Handle
|
||||
EXIT FUNCTION
|
||||
ELSEIF RTRIM$(__UI_ThemeImages(NextSlot).FileName) = "" THEN
|
||||
'Found an empty slot
|
||||
END IF
|
||||
NEXT
|
||||
|
||||
A$ = __UI_ImageData$(FileName$)
|
||||
IF LEN(A$) = 0 THEN EXIT FUNCTION
|
||||
|
||||
NewWidth = CVI(LEFT$(A$, 2))
|
||||
NewHeight = CVI(MID$(A$, 3, 2))
|
||||
A$ = MID$(A$, 5)
|
||||
|
||||
FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4)
|
||||
IF INSTR(1, B$, "%") THEN
|
||||
FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1)
|
||||
IF F$ <> "%" THEN C$ = C$ + F$
|
||||
NEXT: B$ = C$
|
||||
END IF: FOR t% = LEN(B$) TO 1 STEP -1
|
||||
B& = B& * 64 + ASC(MID$(B$, t%)) - 48
|
||||
NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1
|
||||
X$ = X$ + CHR$(B& AND 255): B& = B& \ 256
|
||||
NEXT: btemp$ = btemp$ + X$: NEXT
|
||||
BASFILE$ = btemp$
|
||||
|
||||
TempImage = _NEWIMAGE(NewWidth, NewHeight, 32)
|
||||
MemoryBlock = _MEMIMAGE(TempImage)
|
||||
|
||||
__UI_MemCopy MemoryBlock.OFFSET, _OFFSET(BASFILE$), LEN(BASFILE$)
|
||||
_MEMFREE MemoryBlock
|
||||
|
||||
IF NextSlot > UBOUND(__UI_ThemeImages) THEN
|
||||
'No empty slots. We must increase __UI_ThemeImages()
|
||||
REDIM _PRESERVE __UI_ThemeImages(0 TO NextSlot + 99) AS __UI_ThemeImagesType
|
||||
' If we have already loaded the image, then simply return the handle
|
||||
IF HashTable_IsKeyPresent(__UI_ThemeImages(), id) THEN
|
||||
__UI_LoadThemeImage = HashTable_LookupLong(__UI_ThemeImages(), id)
|
||||
EXIT FUNCTION
|
||||
END IF
|
||||
__UI_ThemeImages(NextSlot).FileName = FileName$
|
||||
__UI_ThemeImages(NextSlot).Handle = TempImage
|
||||
|
||||
__UI_LoadThemeImage& = TempImage
|
||||
' Else we will decode it from memory
|
||||
DIM imageHandle AS LONG: imageHandle = _LOADIMAGE(__UI_ImageData(id), 32, "memory")
|
||||
|
||||
IF imageHandle < -1 THEN
|
||||
HashTable_InsertLong __UI_ThemeImages(), id, imageHandle
|
||||
__UI_LoadThemeImage = imageHandle
|
||||
ELSE
|
||||
ERROR 51
|
||||
END IF
|
||||
END FUNCTION
|
||||
|
||||
'---------------------------------------------------------------------------------
|
||||
|
@ -6862,7 +6829,7 @@ SUB __UI_DrawButton (This AS __UI_ControlTYPE, ControlState AS _BYTE)
|
|||
CONST ButtonHeight = 21
|
||||
CONST ButtonWidth = 18
|
||||
|
||||
IF ControlImage = 0 THEN ControlImage = __UI_LoadThemeImage("button.png")
|
||||
IF ControlImage = 0 THEN ControlImage = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_BUTTON)
|
||||
|
||||
TempControlState = ControlState
|
||||
IF TempControlState = 1 THEN
|
||||
|
@ -7205,7 +7172,7 @@ SUB __UI_DrawRadioButton (This AS __UI_ControlTYPE, ControlState AS _BYTE)
|
|||
CONST ImageHeight = 13
|
||||
CONST ImageWidth = 13
|
||||
|
||||
IF ControlImage = 0 THEN ControlImage = __UI_LoadThemeImage("radiobutton.png")
|
||||
IF ControlImage = 0 THEN ControlImage = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_RADIOBUTTON)
|
||||
|
||||
IF This.Redraw OR This.ControlState <> ControlState OR This.FocusState <> (__UI_Focus = This.ID) OR Caption(This.ID) <> __UI_TempCaptions(This.ID) OR This.Value <> This.PreviousValue OR This.PreviousParentID <> This.ParentID _
|
||||
OR __UI_ForceRedraw OR This.PreviousFont <> This.Font THEN
|
||||
|
@ -7284,7 +7251,7 @@ SUB __UI_DrawCheckBox (This AS __UI_ControlTYPE, ControlState AS _BYTE)
|
|||
CONST ImageHeight = 13
|
||||
CONST ImageWidth = 13
|
||||
|
||||
IF ControlImage = 0 THEN ControlImage = __UI_LoadThemeImage("checkbox.png")
|
||||
IF ControlImage = 0 THEN ControlImage = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_CHECKBOX)
|
||||
|
||||
IF This.Redraw OR This.ControlState <> ControlState OR This.FocusState <> (__UI_Focus = This.ID) OR Caption(This.ID) <> __UI_TempCaptions(This.ID) OR This.Value <> This.PreviousValue OR This.PreviousParentID <> This.ParentID _
|
||||
OR __UI_ForceRedraw OR This.PreviousFont <> This.Font THEN
|
||||
|
@ -7360,8 +7327,8 @@ SUB __UI_DrawProgressBar (This AS __UI_ControlTYPE, ControlState)
|
|||
|
||||
STATIC ControlImage_Track AS LONG, ControlImage_Chunk AS LONG
|
||||
|
||||
IF ControlImage_Chunk = 0 THEN ControlImage_Chunk = __UI_LoadThemeImage("progresschunk.png")
|
||||
IF ControlImage_Track = 0 THEN ControlImage_Track = __UI_LoadThemeImage("progresstrack.png")
|
||||
IF ControlImage_Chunk = 0 THEN ControlImage_Chunk = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_PROGRESSCHUNK)
|
||||
IF ControlImage_Track = 0 THEN ControlImage_Track = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_PROGRESSTRACK)
|
||||
|
||||
IF This.Redraw OR This.ControlState <> ControlState OR This.FocusState <> (__UI_Focus = This.ID) OR Caption(This.ID) <> __UI_TempCaptions(This.ID) OR This.Value <> This.PreviousValue OR This.PreviousParentID <> This.ParentID _
|
||||
OR __UI_ForceRedraw OR This.PreviousFont <> This.Font THEN
|
||||
|
@ -7488,9 +7455,9 @@ SUB __UI_DrawTrackBar (This AS __UI_ControlTYPE, ControlState)
|
|||
CONST SliderHeight = 21
|
||||
CONST SliderWidth = 11
|
||||
|
||||
IF ControlImage_Track = 0 THEN ControlImage_Track = __UI_LoadThemeImage("slidertrack.png")
|
||||
IF ControlImage_Track = 0 THEN ControlImage_Track = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_SLIDERTRACK)
|
||||
IF ControlImage_Slider = 0 THEN
|
||||
ControlImage_Slider = __UI_LoadThemeImage("sliderdown.png")
|
||||
ControlImage_Slider = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_SLIDERDOWN)
|
||||
__UI_ClearColor ControlImage_Slider, 0, 0
|
||||
END IF
|
||||
|
||||
|
@ -7996,9 +7963,9 @@ SUB __UI_DrawVScrollBar (TempThis AS __UI_ControlTYPE, ControlState AS _BYTE)
|
|||
CONST ImageHeight_Thumb = 22
|
||||
CONST ImageWidth_Thumb = 15
|
||||
|
||||
IF ControlImage_Button = 0 THEN ControlImage_Button = __UI_LoadThemeImage("scrollbuttons.png")
|
||||
IF ControlImage_Track = 0 THEN ControlImage_Track = __UI_LoadThemeImage("scrolltrack.png")
|
||||
IF ControlImage_Thumb = 0 THEN ControlImage_Thumb = __UI_LoadThemeImage("scrollthumb.png")
|
||||
IF ControlImage_Button = 0 THEN ControlImage_Button = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_SCROLLBUTTONS)
|
||||
IF ControlImage_Track = 0 THEN ControlImage_Track = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_SCROLLTRACK)
|
||||
IF ControlImage_Thumb = 0 THEN ControlImage_Thumb = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_SCROLLTHUMB)
|
||||
|
||||
This = TempThis
|
||||
|
||||
|
@ -8104,9 +8071,9 @@ SUB __UI_DrawDropdownList (This AS __UI_ControlTYPE, ControlState)
|
|||
CONST ArrowWidth = 9
|
||||
CONST ArrowHeight = 9
|
||||
|
||||
IF ControlImage = 0 THEN ControlImage = __UI_LoadThemeImage("button.png")
|
||||
IF ControlImage = 0 THEN ControlImage = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_BUTTON)
|
||||
IF ControlImage_Arrow = 0 THEN
|
||||
ControlImage_Arrow = __UI_LoadThemeImage("arrows.png")
|
||||
ControlImage_Arrow = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_ARROWS)
|
||||
__UI_ClearColor ControlImage_Arrow, 0, 0
|
||||
END IF
|
||||
|
||||
|
@ -8256,7 +8223,7 @@ SUB __UI_DrawFrame (This AS __UI_ControlTYPE)
|
|||
STATIC ControlImage AS LONG
|
||||
|
||||
IF ControlImage = 0 THEN
|
||||
ControlImage = __UI_LoadThemeImage("frame.png")
|
||||
ControlImage = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_FRAME)
|
||||
__UI_ClearColor ControlImage, 0, 0
|
||||
END IF
|
||||
|
||||
|
@ -8434,7 +8401,7 @@ SUB __UI_DrawMenuPanel (This AS __UI_ControlTYPE, Parent AS LONG)
|
|||
CONST CheckMarkWidth = 7
|
||||
CONST CheckMarkHeight = 7
|
||||
IF ControlImage = 0 THEN
|
||||
ControlImage = __UI_LoadThemeImage("menucheckmark.bmp")
|
||||
ControlImage = __UI_LoadThemeImage(__INFORM_THEME_IMAGE_MENUCHECKMARK)
|
||||
__UI_ClearColor ControlImage, 0, 0
|
||||
END IF
|
||||
IF SubMenuArrow = 0 THEN
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'Starting with v1.0, __UI_VersionNumber is actually the current build.
|
||||
|
||||
CONST __UI_Version = "v1.5"
|
||||
CONST __UI_VersionNumber = 2
|
||||
CONST __UI_VersionIsBeta = 1
|
||||
CONST __UI_CopyrightSpan = "2016-2023"
|
||||
CONST __UI_Version = "1.5"
|
||||
CONST __UI_VersionNumber = 3
|
||||
CONST __UI_VersionIsBeta = TRUE
|
||||
CONST __UI_CopyrightSpan = "2016-2024"
|
||||
|
|
|
@ -582,7 +582,7 @@ AddToggleSwitch
|
|||
CASE HelpMenuAbout
|
||||
DIM isBeta$
|
||||
IF __UI_VersionIsBeta THEN isBeta$ = " Beta Version" ELSE isBeta$ = ""
|
||||
MessageBox "InForm GUI for QB64-PE - Created by Fellippe Heitor (2016-2021)" + STRING$(2, 13) + UiEditorTitle$ + " " + __UI_Version + " (build" + STR$(__UI_VersionNumber) + isBeta$ + ")" + STRING$(2, 13) + "Updates by George McGinn (gbytes58@gmail.com)" + STRING$(2, 13) + "QB64-PE port by Samuel Gomes (a740g)" + STRING$(2, 13) + "GitHub: https://github.com/a740g/InForm-PE", UiEditorTitle$ + " - About", MsgBox_Information
|
||||
MessageBox "InForm GUI for QB64-PE - Created by Fellippe Heitor (" + __UI_CopyrightSpan + ")" + STRING$(2, 13) + UiEditorTitle$ + " v" + __UI_Version + " (build" + STR$(__UI_VersionNumber) + isBeta$ + ")" + STRING$(2, 13) + "Updates by George McGinn (gbytes58@gmail.com)" + STRING$(2, 13) + "QB64-PE port by Samuel Gomes (a740g)" + STRING$(2, 13) + "GitHub: https://github.com/a740g/InForm-PE", UiEditorTitle$ + " - About", MsgBox_Information
|
||||
CASE HelpMenuHelp
|
||||
MessageBox "Design a form and export the resulting code to generate an event-driven QB64-PE program.", UiEditorTitle$ + " - What's all this?", MsgBox_Information
|
||||
CASE FileMenuExit
|
||||
|
@ -4065,7 +4065,7 @@ SUB SaveForm (ExitToQB64 AS _BYTE, SaveOnlyFrm AS _BYTE)
|
|||
TextFileNum = FREEFILE
|
||||
OPEN BaseOutputFileName + ".frm" FOR OUTPUT AS #TextFileNum
|
||||
PRINT #TextFileNum, "': This form was generated by"
|
||||
PRINT #TextFileNum, "': InForm - GUI library for QB64 - "; __UI_Version
|
||||
PRINT #TextFileNum, "': InForm - GUI library for QB64 - v"; __UI_Version
|
||||
PRINT #TextFileNum, "': Fellippe Heitor, " + __UI_CopyrightSpan + " - fellippe@qb64.org - @fellippeheitor"
|
||||
PRINT #TextFileNum, "': https://github.com/FellippeHeitor/InForm"
|
||||
PRINT #TextFileNum, "'-----------------------------------------------------------"
|
||||
|
@ -4542,7 +4542,7 @@ SUB SaveForm (ExitToQB64 AS _BYTE, SaveOnlyFrm AS _BYTE)
|
|||
ELSE
|
||||
OPEN BaseOutputFileName + ".bas" FOR OUTPUT AS #TextFileNum
|
||||
PRINT #TextFileNum, "': This program uses"
|
||||
PRINT #TextFileNum, "': InForm - GUI library for QB64 - "; __UI_Version
|
||||
PRINT #TextFileNum, "': InForm - GUI library for QB64 - v"; __UI_Version
|
||||
PRINT #TextFileNum, "': Fellippe Heitor, " + __UI_CopyrightSpan + " - fellippe@qb64.org - @fellippeheitor"
|
||||
PRINT #TextFileNum, "': https://github.com/FellippeHeitor/InForm"
|
||||
PRINT #TextFileNum, "'-----------------------------------------------------------"
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
OPTION _EXPLICIT
|
||||
$CONSOLE:ONLY
|
||||
|
||||
CONST FALSE = 0, TRUE = NOT FALSE
|
||||
|
||||
'$INCLUDE:'InFormVersion.bas'
|
||||
|
||||
PRINT "InForm - GUI system for QB64 - "; __UI_Version
|
||||
PRINT "InForm - GUI system for QB64 - v"; __UI_Version
|
||||
PRINT "VBDOS to InForm form conversion utility"
|
||||
PRINT "-------------------------------------------------"
|
||||
|
||||
|
@ -43,7 +45,7 @@ END IF
|
|||
|
||||
DIM FormName$: FormName$ = MID$(a$, 12)
|
||||
|
||||
DIM o$: o$ = "'InForm - GUI system for QB64 - " + __UI_Version
|
||||
DIM o$: o$ = "'InForm - GUI system for QB64 - v" + __UI_Version
|
||||
o$ = o$ + lf + "'Fellippe Heitor, " + __UI_CopyrightSpan + " - fellippe@qb64.org - @FellippeHeitor"
|
||||
o$ = o$ + lf + "'-----------------------------------------------------------"
|
||||
o$ = o$ + lf + "SUB __UI_LoadForm"
|
||||
|
@ -195,7 +197,7 @@ DIM TextFileNum AS LONG: TextFileNum = FREEFILE
|
|||
DIM newTextFile$: newTextFile$ = LEFT$(theFile$, INSTR(theFile$, ".") - 1) + "_InForm.bas"
|
||||
OPEN newTextFile$ FOR OUTPUT AS #TextFileNum
|
||||
PRINT #TextFileNum, "': This program was generated by"
|
||||
PRINT #TextFileNum, "': InForm - GUI system for QB64 - "; __UI_Version
|
||||
PRINT #TextFileNum, "': InForm - GUI system for QB64 - v"; __UI_Version
|
||||
PRINT #TextFileNum, "': Fellippe Heitor, " + __UI_CopyrightSpan + " - fellippe@qb64.org - @fellippeheitor"
|
||||
PRINT #TextFileNum, "'-----------------------------------------------------------"
|
||||
PRINT #TextFileNum,
|
||||
|
|
1330
InForm/xp.uitheme
1330
InForm/xp.uitheme
File diff suppressed because it is too large
Load diff
|
@ -18,6 +18,47 @@ DIM SHARED ContextMenu1Copy AS LONG
|
|||
'$INCLUDE:'../../InForm/xp.uitheme'
|
||||
'$INCLUDE:'../../InForm/InForm.ui'
|
||||
|
||||
FUNCTION GetThemeImageId~%% (fileName AS STRING)
|
||||
SELECT CASE LCASE$(fileName)
|
||||
CASE "scrollhbuttons.bmp"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_SCROLLHBUTTONS
|
||||
CASE "scrollhthumb.bmp"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_SCROLLHTHUMB
|
||||
CASE "scrollhtrack.bmp"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_SCROLLHTRACK
|
||||
CASE "menucheckmark.bmp"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_MENUCHECKMARK
|
||||
CASE "slidertrack.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_SLIDERTRACK
|
||||
CASE "frame.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_FRAME
|
||||
CASE "arrows.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_ARROWS
|
||||
CASE "scrolltrack.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_SCROLLTRACK
|
||||
CASE "scrollthumb.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_SCROLLTHUMB
|
||||
CASE "scrollbuttons.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_SCROLLBUTTONS
|
||||
CASE "radiobutton.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_RADIOBUTTON
|
||||
CASE "progresstrack.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_PROGRESSTRACK
|
||||
CASE "progresschunk.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_PROGRESSCHUNK
|
||||
CASE "button.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_BUTTON
|
||||
CASE "checkbox.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_CHECKBOX
|
||||
CASE "notfound.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_NOTFOUND
|
||||
CASE "sliderdown.png"
|
||||
GetThemeImageId = __INFORM_THEME_IMAGE_SLIDERDOWN
|
||||
CASE ELSE
|
||||
ERROR 5
|
||||
END SELECT
|
||||
END FUNCTION
|
||||
|
||||
': Event procedures: ---------------------------------------------------------------
|
||||
|
||||
SUB __UI_BeforeInit
|
||||
|
@ -149,7 +190,7 @@ SUB __UI_ValueChanged (id AS LONG)
|
|||
SELECT CASE id
|
||||
CASE DropdownList1
|
||||
_FREEIMAGE Control(PictureBox1).HelperCanvas
|
||||
Control(PictureBox1).HelperCanvas = _COPYIMAGE(__UI_LoadThemeImage(GetItem$(DropdownList1, Control(DropdownList1).Value)))
|
||||
Control(PictureBox1).HelperCanvas = _COPYIMAGE(__UI_LoadThemeImage(GetThemeImageId(GetItem$(DropdownList1, Control(DropdownList1).Value))))
|
||||
Control(PictureBox1).Redraw = TRUE
|
||||
END SELECT
|
||||
END SUB
|
||||
|
|
Loading…
Reference in a new issue