You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: InForm/xp.uitheme
+35-16Lines changed: 35 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -67,8 +67,9 @@ SUB __UI_DrawButton (This AS __UI_ControlTYPE, ControlState AS _BYTE)
67
67
END IF
68
68
END IF
69
69
70
-
IF This.ControlState <> TempControlState OR This.FocusState <> (__UI_Focus = This.ID) OR Caption(This.ID) <> __UI_TempCaptions(This.ID) OR This.PreviousParentID <> This.ParentID OR __UI_ForceRedraw THEN
70
+
IF This.Redraw OR This.ControlState <> TempControlState OR This.FocusState <> (__UI_Focus = This.ID) OR Caption(This.ID) <> __UI_TempCaptions(This.ID) OR This.PreviousParentID <> This.ParentID OR __UI_ForceRedraw THEN
71
71
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
72
+
This.Redraw = False
72
73
This.ControlState = TempControlState
73
74
This.FocusState = __UI_Focus = This.ID
74
75
__UI_TempCaptions(This.ID) = Caption(This.ID)
@@ -100,9 +101,14 @@ SUB __UI_DrawButton (This AS __UI_ControlTYPE, ControlState AS _BYTE)
@@ -150,8 +156,9 @@ SUB __UI_DrawLabel (This AS __UI_ControlTYPE, ControlState AS _BYTE)
150
156
DIM PrevDest AS LONG, Temp&
151
157
DIM CaptionIndent AS INTEGER, TempCaption$, TempLine$
152
158
153
-
IF This.ControlState <> ControlState OR Caption(This.ID) <> __UI_TempCaptions(This.ID) OR This.PreviousParentID <> This.ParentID OR __UI_ForceRedraw THEN
159
+
IF This.Redraw OR This.ControlState <> ControlState OR Caption(This.ID) <> __UI_TempCaptions(This.ID) OR This.PreviousParentID <> This.ParentID OR __UI_ForceRedraw THEN
154
160
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
161
+
This.Redraw = False
155
162
This.ControlState = ControlState
156
163
__UI_TempCaptions(This.ID) = Caption(This.ID)
157
164
IF This.ParentID THEN Control(This.ParentID).ChildrenRedrawn = True
@@ -288,8 +295,9 @@ SUB __UI_DrawToggleSwitch (This AS __UI_ControlTYPE, ControlState AS _BYTE)
288
295
289
296
'IF ControlImage = 0 THEN ControlImage = __UI_LoadThemeImage("radiobutton.png")
290
297
291
-
IF This.ControlState <> ControlState OR TIMER - This.LastChange < .5 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 THEN
298
+
IF This.Redraw OR This.ControlState <> ControlState OR TIMER - This.LastChange < .5 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 THEN
292
299
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
300
+
This.Redraw = False
293
301
This.ControlState = ControlState
294
302
This.FocusState = __UI_Focus = This.ID
295
303
This.PreviousValue = This.Value
@@ -345,7 +353,7 @@ SUB __UI_DrawToggleSwitch (This AS __UI_ControlTYPE, ControlState AS _BYTE)
345
353
346
354
'Focus outline
347
355
IF __UI_Focus = This.ID AND __UI_KeyboardFocus THEN
348
-
LINE (CaptionIndent - 1, 0)-STEP(This.Width - CaptionIndent - 1, This.Height - 1), _RGB32(0, 0, 0), B , 21845
356
+
LINE (1, 1)-STEP(This.Width - 2, This.Height - 2), _RGB32(0, 0, 0), B , 21845
349
357
END IF
350
358
'------
351
359
@@ -367,8 +375,9 @@ SUB __UI_DrawRadioButton (This AS __UI_ControlTYPE, ControlState AS _BYTE)
367
375
368
376
IF ControlImage = 0 THEN ControlImage = __UI_LoadThemeImage("radiobutton.png")
369
377
370
-
IF 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 THEN
378
+
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 THEN
371
379
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
380
+
This.Redraw = False
372
381
This.ControlState = ControlState
373
382
This.FocusState = __UI_Focus = This.ID
374
383
This.PreviousValue = This.Value
@@ -445,8 +454,9 @@ SUB __UI_DrawCheckBox (This AS __UI_ControlTYPE, ControlState AS _BYTE)
445
454
446
455
IF ControlImage = 0 THEN ControlImage = __UI_LoadThemeImage("checkbox.png")
447
456
448
-
IF 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 THEN
457
+
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 THEN
449
458
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
459
+
This.Redraw = False
450
460
This.ControlState = ControlState
451
461
This.FocusState = __UI_Focus = This.ID
452
462
This.PreviousValue = This.Value
@@ -518,8 +528,9 @@ SUB __UI_DrawProgressBar (This AS __UI_ControlTYPE, ControlState)
518
528
IF ControlImage_Chunk = 0 THEN ControlImage_Chunk = __UI_LoadThemeImage("progresschunk.png")
519
529
IF ControlImage_Track = 0 THEN ControlImage_Track = __UI_LoadThemeImage("progresstrack.png")
520
530
521
-
IF 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 THEN
531
+
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 THEN
522
532
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
533
+
This.Redraw = False
523
534
This.ControlState = ControlState
524
535
This.FocusState = __UI_Focus = This.ID
525
536
This.PreviousValue = This.Value
@@ -613,8 +624,9 @@ SUB __UI_DrawTrackBar (This AS __UI_ControlTYPE, ControlState)
613
624
TempControlState = ControlState
614
625
IF This.Disabled THEN TempControlState = 5
615
626
616
-
IF This.ControlState <> TempControlState OR This.FocusState <> (__UI_Focus = This.ID) OR This.Value <> This.PreviousValue OR This.PreviousParentID <> This.ParentID OR __UI_ForceRedraw THEN
627
+
IF This.Redraw OR This.ControlState <> TempControlState OR This.FocusState <> (__UI_Focus = This.ID) OR This.Value <> This.PreviousValue OR This.PreviousParentID <> This.ParentID OR __UI_ForceRedraw THEN
617
628
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
629
+
This.Redraw = False
618
630
This.ControlState = TempControlState
619
631
This.FocusState = __UI_Focus = This.ID
620
632
IF This.PreviousValue <> This.Value THEN
@@ -676,7 +688,7 @@ SUB __UI_DrawTextBox (This AS __UI_ControlTYPE, ControlState, ss1 AS LONG, ss2 A
676
688
677
689
__UI_CursorAdjustments This.ID
678
690
679
-
IF This.ControlState <> ControlState OR _
691
+
IF This.Redraw OR This.ControlState <> ControlState OR _
680
692
This.FocusState <> (__UI_Focus = This.ID) OR _
681
693
Caption(This.ID) <> __UI_TempCaptions(This.ID) OR _
682
694
Text(This.ID) <> __UI_TempTexts(This.ID) OR _
@@ -690,6 +702,7 @@ SUB __UI_DrawTextBox (This AS __UI_ControlTYPE, ControlState, ss1 AS LONG, ss2 A
690
702
__UI_ForceRedraw THEN
691
703
692
704
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
705
+
This.Redraw = False
693
706
This.ControlState = ControlState
694
707
This.FocusState = __UI_Focus = This.ID
695
708
__UI_TempCaptions(This.ID) = Caption(This.ID)
@@ -909,8 +922,9 @@ SUB __UI_DrawListBox (This AS __UI_ControlTYPE, ControlState)
909
922
DIM PrevDest AS LONG, Temp&
910
923
DIM CaptionIndent AS INTEGER, TempCaption$
911
924
912
-
IF This.ControlState <> ControlState OR This.FocusState <> (__UI_Focus = This.ID) OR This.PreviousValue <> This.Value OR Text(This.ID) <> __UI_TempTexts(This.ID) OR This.PreviousInputViewStart <> This.InputViewStart OR This.PreviousParentID <> This.ParentID OR __UI_ForceRedraw THEN
925
+
IF This.Redraw OR This.ControlState <> ControlState OR This.FocusState <> (__UI_Focus = This.ID) OR This.PreviousValue <> This.Value OR Text(This.ID) <> __UI_TempTexts(This.ID) OR This.PreviousInputViewStart <> This.InputViewStart OR This.PreviousParentID <> This.ParentID OR __UI_ForceRedraw THEN
913
926
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
927
+
This.Redraw = False
914
928
This.ControlState = ControlState
915
929
This.FocusState = __UI_Focus = This.ID
916
930
This.PreviousValue = This.Value
@@ -1140,14 +1154,15 @@ SUB __UI_DrawDropdownList (This AS __UI_ControlTYPE, ControlState)
1140
1154
__UI_ClearColor ControlImage_Arrow, 0, 0
1141
1155
END IF
1142
1156
1143
-
IF This.ControlState <> ControlState OR _
1157
+
IF This.Redraw OR This.ControlState <> ControlState OR _
1144
1158
This.FocusState <> (__UI_Focus = This.ID) OR _
1145
1159
This.PreviousValue <> This.Value OR _
1146
1160
Text(This.ID) <> __UI_TempTexts(This.ID) OR _
1147
1161
This.PreviousInputViewStart <> This.InputViewStart OR _
1148
1162
This.PreviousParentID <> This.ParentID OR _
1149
1163
__UI_ForceRedraw THEN
1150
1164
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
1165
+
This.Redraw = False
1151
1166
This.ControlState = ControlState
1152
1167
This.FocusState = __UI_Focus = This.ID
1153
1168
This.PreviousValue = This.Value
@@ -1275,8 +1290,9 @@ SUB __UI_DrawFrame (This AS __UI_ControlTYPE)
1275
1290
__UI_ClearColor ControlImage, 0, 0
1276
1291
END IF
1277
1292
1278
-
IF This.PreviouslyHidden <> This.Hidden OR This.ChildrenRedrawn OR Caption(This.ID) <> __UI_TempCaptions(This.ID) OR This.HelperCanvas = 0 OR (__UI_IsDragging AND Control(__UI_DraggingID).ParentID = This.ID) OR This.Value <> This.PreviousValue OR __UI_ForceRedraw OR __UI_DesignMode THEN
1293
+
IF This.Redraw OR This.PreviouslyHidden <> This.Hidden OR This.ChildrenRedrawn OR Caption(This.ID) <> __UI_TempCaptions(This.ID) OR This.HelperCanvas = 0 OR (__UI_IsDragging AND Control(__UI_DraggingID).ParentID = This.ID) OR This.Value <> This.PreviousValue OR __UI_ForceRedraw OR __UI_DesignMode THEN
1279
1294
'Last time we drew this frame its children had different images
1295
+
This.Redraw = False
1280
1296
This.ChildrenRedrawn = False
1281
1297
This.PreviousValue = This.Value
1282
1298
This.PreviouslyHidden = This.Hidden
@@ -1367,8 +1383,9 @@ SUB __UI_DrawMenuBar (This AS __UI_ControlTYPE, ControlState AS _BYTE)
1367
1383
DIM PrevDest AS LONG, CaptionIndent AS INTEGER, TempCaption$
1368
1384
DIM Temp&
1369
1385
1370
-
IF This.FocusState <> (__UI_Focus = This.ID) OR This.Value <> This.PreviousValue OR This.ControlState <> ControlState OR Caption(This.ID) <> __UI_TempCaptions(This.ID) OR __UI_ForceRedraw THEN
1386
+
IF This.Redraw OR This.FocusState <> (__UI_Focus = This.ID) OR This.Value <> This.PreviousValue OR This.ControlState <> ControlState OR Caption(This.ID) <> __UI_TempCaptions(This.ID) OR __UI_ForceRedraw THEN
1371
1387
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
1388
+
This.Redraw = False
1372
1389
This.ControlState = ControlState
1373
1390
This.PreviousValue = This.Value
1374
1391
@@ -1447,8 +1464,9 @@ SUB __UI_DrawMenuPanel (This AS __UI_ControlTYPE, ControlState AS _BYTE)
1447
1464
__UI_ClearColor ControlImage, 0, 0
1448
1465
END IF
1449
1466
1450
-
IF This.Value <> This.PreviousValue OR This.FocusState <> (__UI_Focus = This.ID) OR This.ControlState <> ControlState OR __UI_ForceRedraw THEN
1467
+
IF This.Redraw OR This.Value <> This.PreviousValue OR This.FocusState <> (__UI_Focus = This.ID) OR This.ControlState <> ControlState OR __UI_ForceRedraw THEN
1451
1468
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
1469
+
This.Redraw = False
1452
1470
This.FocusState = (__UI_Focus = This.ID)
1453
1471
This.ControlState = ControlState
1454
1472
This.PreviousValue = This.Value
@@ -1543,8 +1561,9 @@ SUB __UI_DrawPictureBox (This AS __UI_ControlTYPE, ControlState AS _BYTE)
1543
1561
DIM PrevDest AS LONG, TheX AS INTEGER, TheY AS INTEGER
1544
1562
DIM CaptionIndent AS INTEGER, TempCaption$
1545
1563
1546
-
IF This.Stretch <> This.PreviousStretch OR This.PreviousValue <> This.HelperCanvas OR This.ControlState <> ControlState OR This.PreviousParentID <> This.ParentID OR __UI_ForceRedraw THEN
1564
+
IF This.Redraw OR This.Stretch <> This.PreviousStretch OR This.PreviousValue <> This.HelperCanvas OR This.ControlState <> ControlState OR This.PreviousParentID <> This.ParentID OR __UI_ForceRedraw THEN
1547
1565
'Last time this control was drawn it had a different state/caption, so it'll be redrawn
1566
+
This.Redraw = False
1548
1567
This.ControlState = ControlState
1549
1568
IF This.ParentID THEN Control(This.ParentID).ChildrenRedrawn = True
InForm's main goal is to generate event-driven QB64 applications. This means that you design a graphical user interface with interactive controls and then write the code to respond to such controls once they are manipulated.
8
12
9
13
## Workflow
10
-
After your form looks the way you want it to, click File -> Save to export its contents and generate a .bas source file. Three files are output:
11
-
***.frmbin**
12
-
the binary form that can be later edited.
13
-
14
+
After your form looks the way you want it to, click File -> Save to export its contents and generate a .bas source file. Two files are output:
14
15
***.frm**
15
-
a representation of the generated form in QB64 code. This can be edited in QB64 or any text editor later, if you want to adjust fine details.
16
+
the generated form in QB64 code. This can be loaded back into InForm's designer or manually edited in QB64 or any text editor later, if you want to adjust fine details.
16
17
17
18
***.bas**
18
19
the actual program you will add your code to.
@@ -31,3 +32,4 @@ the actual program you will add your code to.
31
32
**OnLoad*, triggered right after the form is first shown.
32
33
**BeforeUpdateDisplay*, triggered everytime the form is about to be repainted.
33
34
**BeforeUnload*, triggered when the user tries to close the program, either via clicking the window's X button, right click in the task bar -> Close or with Alt+F4 (Windows only).
35
+
**FormResized*, triggered when a form with the CanResize property is resized at runtime.
..\qb64\qb64 -x "C:\Documents and Settings\Administrator\Desktop\InForm\InForm\UiEditor.bas" -o "C:\Documents and Settings\Administrator\Desktop\qb64\UiEditor.exe"
12
+
..\qb64\qb64 -x "C:\Documents and Settings\Administrator\Desktop\InForm\InForm\UiEditorPreview.bas" -o "C:\Documents and Settings\Administrator\Desktop\qb64\InForm\UiEditorPreview.exe"
0 commit comments