Skip to content

Commit 1695bcb

Browse files
authored
Add .bi extension to QuickBASIC (#7654)
Add .bi extension to QuickBASIC
1 parent 63a42fc commit 1695bcb

File tree

3 files changed

+121
-0
lines changed

3 files changed

+121
-0
lines changed

lib/linguist/heuristics.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ disambiguations:
139139
and:
140140
- pattern: '(?i)^[ \t]*return '
141141
- negative_pattern: '(?i)[ \t]*gosub '
142+
- language: QuickBASIC
143+
named_pattern: quickbasic
142144
- extensions: ['.bs']
143145
rules:
144146
- language: Bikeshed

lib/linguist/languages.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6150,6 +6150,7 @@ QuickBASIC:
61506150
color: "#008080"
61516151
extensions:
61526152
- ".bas"
6153+
- ".bi"
61536154
tm_scope: source.QB64
61546155
aliases:
61556156
- qb

samples/QuickBASIC/InForm.bi

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
'-----------------------------------------------------------------------------------------------------------------------
2+
' InForm-PE GUI engine for QB64-PE
3+
' Copyright (c) 2025 Samuel Gomes
4+
' Copyright (c) 2023 George McGinn
5+
' Copyright (c) 2022 Fellippe Heitor
6+
'-----------------------------------------------------------------------------------------------------------------------
7+
8+
$INCLUDEONCE
9+
10+
$LET INFORM_BI = TRUE
11+
12+
$SCREENHIDE
13+
_ALLOWFULLSCREEN OFF
14+
_CONTROLCHR OFF
15+
16+
'$INCLUDE:'InFormCommon.bi'
17+
18+
'Control types: -----------------------------------------------
19+
__UI_Type(__UI_Type_Form).Name = "Form"
20+
21+
__UI_Type(__UI_Type_Frame).Name = "Frame"
22+
__UI_Type(__UI_Type_Frame).DefaultWidth = 230
23+
__UI_Type(__UI_Type_Frame).DefaultHeight = 150
24+
25+
__UI_Type(__UI_Type_Button).Name = "Button"
26+
__UI_Type(__UI_Type_Button).DefaultWidth = 80
27+
__UI_Type(__UI_Type_Button).DefaultHeight = 23
28+
29+
__UI_Type(__UI_Type_Label).Name = "Label"
30+
__UI_Type(__UI_Type_Label).DefaultWidth = 150
31+
__UI_Type(__UI_Type_Label).DefaultHeight = 23
32+
33+
__UI_Type(__UI_Type_CheckBox).Name = "CheckBox"
34+
__UI_Type(__UI_Type_CheckBox).DefaultWidth = 150
35+
__UI_Type(__UI_Type_CheckBox).DefaultHeight = 23
36+
__UI_Type(__UI_Type_CheckBox).TurnsInto = __UI_Type_ToggleSwitch
37+
38+
__UI_Type(__UI_Type_RadioButton).Name = "RadioButton"
39+
__UI_Type(__UI_Type_RadioButton).DefaultWidth = 150
40+
__UI_Type(__UI_Type_RadioButton).DefaultHeight = 23
41+
42+
__UI_Type(__UI_Type_TextBox).Name = "TextBox"
43+
__UI_Type(__UI_Type_TextBox).DefaultWidth = 120
44+
__UI_Type(__UI_Type_TextBox).DefaultHeight = 23
45+
46+
__UI_Type(__UI_Type_ProgressBar).Name = "ProgressBar"
47+
__UI_Type(__UI_Type_ProgressBar).DefaultWidth = 300
48+
__UI_Type(__UI_Type_ProgressBar).DefaultHeight = 23
49+
50+
__UI_Type(__UI_Type_ListBox).Name = "ListBox"
51+
__UI_Type(__UI_Type_ListBox).DefaultWidth = 200
52+
__UI_Type(__UI_Type_ListBox).DefaultHeight = 200
53+
__UI_Type(__UI_Type_ListBox).TurnsInto = __UI_Type_DropdownList
54+
55+
__UI_Type(__UI_Type_DropdownList).Name = "DropdownList"
56+
__UI_Type(__UI_Type_DropdownList).DefaultWidth = 200
57+
__UI_Type(__UI_Type_DropdownList).DefaultHeight = 23
58+
__UI_Type(__UI_Type_DropdownList).TurnsInto = __UI_Type_ListBox
59+
60+
__UI_Type(__UI_Type_MenuBar).Name = "MenuBar"
61+
__UI_Type(__UI_Type_MenuBar).TurnsInto = __UI_Type_ContextMenu
62+
__UI_Type(__UI_Type_MenuBar).RestrictResize = __UI_CantResizeV
63+
64+
__UI_Type(__UI_Type_MenuItem).Name = "MenuItem"
65+
__UI_Type(__UI_Type_MenuItem).RestrictResize = __UI_CantResizeV
66+
67+
__UI_Type(__UI_Type_MenuPanel).Name = "MenuPanel"
68+
69+
__UI_Type(__UI_Type_PictureBox).Name = "PictureBox"
70+
__UI_Type(__UI_Type_PictureBox).DefaultWidth = 230
71+
__UI_Type(__UI_Type_PictureBox).DefaultHeight = 150
72+
73+
__UI_Type(__UI_Type_TrackBar).Name = "TrackBar"
74+
__UI_Type(__UI_Type_TrackBar).DefaultWidth = 300
75+
__UI_Type(__UI_Type_TrackBar).DefaultHeight = 40
76+
__UI_Type(__UI_Type_TrackBar).MinimumHeight = 30
77+
__UI_Type(__UI_Type_TrackBar).RestrictResize = __UI_CantResizeV
78+
79+
__UI_Type(__UI_Type_ContextMenu).Name = "ContextMenu"
80+
__UI_Type(__UI_Type_ContextMenu).TurnsInto = __UI_Type_MenuBar
81+
__UI_Type(__UI_Type_ContextMenu).RestrictResize = __UI_CantResize
82+
__UI_Type(__UI_Type_ContextMenu).DefaultWidth = 22
83+
__UI_Type(__UI_Type_ContextMenu).DefaultHeight = 22
84+
85+
__UI_Type(__UI_Type_Font).Name = "Font"
86+
87+
__UI_Type(__UI_Type_ToggleSwitch).Name = "ToggleSwitch"
88+
__UI_Type(__UI_Type_ToggleSwitch).DefaultWidth = 40
89+
__UI_Type(__UI_Type_ToggleSwitch).DefaultHeight = 17
90+
__UI_Type(__UI_Type_ToggleSwitch).TurnsInto = __UI_Type_CheckBox
91+
__UI_Type(__UI_Type_ToggleSwitch).RestrictResize = __UI_CantResize
92+
'--------------------------------------------------------------
93+
94+
__UI_RestoreFKeys
95+
96+
__UI_SubMenuDelay = .4
97+
__UI_SnapDistance = 5
98+
__UI_SnapDistanceFromForm = 10
99+
__UI_MaxBorderSize = 10
100+
__UI_Font8Offset = 5
101+
__UI_Font16Offset = 3
102+
__UI_ClipboardCheck$ = "InForm" + STRING$(2, 10) + "BEGIN CONTROL DATA" + CHR$(10) + STRING$(60, 45) + CHR$(10)
103+
104+
__UI_ThemeSetup
105+
__UI_InternalMenus
106+
__UI_LoadForm
107+
108+
__UI_Init
109+
110+
'Main loop
111+
DO
112+
_LIMIT 1
113+
LOOP
114+
115+
SYSTEM
116+
117+
__UI_ErrorHandler:
118+
RESUME NEXT

0 commit comments

Comments
 (0)