1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641 | /* GATE PROJECT LICENSE:
+----------------------------------------------------------------------------+
| Copyright(c) 2018-2025, Stefan Meislinger |
| All rights reserved. |
| |
| Redistribution and use in source and binary forms, with or without |
| modification, are permitted provided that the following conditions are met:|
| |
| 1. Redistributions of source code must retain the above copyright notice, |
| this list of conditions and the following disclaimer. |
| 2. Redistributions in binary form must reproduce the above copyright |
| notice, this list of conditions and the following disclaimer in the |
| documentation and/or other materials provided with the distribution. |
| |
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"|
| AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE |
| LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| THE POSSIBILITY OF SUCH DAMAGE. |
+----------------------------------------------------------------------------+
*/
#include "gate/gatemain.h"
#include "gate/results.h"
#include "gate/applications.hpp"
#include "gate/maps.hpp"
#include "gate/strings.hpp"
#include "gate/streams.hpp"
#include "gate/times.hpp"
#include "gate/files.hpp"
#include "gate/wrappers.hpp"
#include "gate/utilities.hpp"
#include "gate/numbers.hpp"
#include "gate/system/os.hpp"
#include "gate/ui/gateui.hpp"
#include "gate/ui/forms.hpp"
#include "gate/ui/buttons.hpp"
#include "gate/ui/labels.hpp"
#include "gate/ui/panels.hpp"
#include "gate/ui/textboxes.hpp"
#include "gate/ui/treeviews.hpp"
#include "gate/ui/listviews.hpp"
#include "gate/ui/splitters.hpp"
#include "gate/ui/paintsurfaces.hpp"
#include "gate/ui/dialogs.hpp"
#include "gate/ui/toolbars.hpp"
#include "gate/ui/statusbars.hpp"
#include "gate/ui/checkboxes.hpp"
#include "gate/ui/comboboxes.hpp"
#include "gate/ui/timers.hpp"
#include "gate/ui/tabs.hpp"
#include "gate/graphics/pixmapimages.hpp"
#include "gate/icons/application.xpm"
#include "gate/icons/refresh.xpm"
#include "gate/icons/folder.xpm"
#include "gate/icons/cut.xpm"
#include "gate/icons/copy.xpm"
#include "gate/icons/paste.xpm"
#include "gate/icons/cancel.xpm"
#if defined(GATE_COMPILER_MSVC) && defined(GATE_LEAK_DETECTION) && defined(GATE_SYS_WIN) && !defined(GATE_SYS_WINCE) && (GATE_ARCH != GATE_ARCH_ARM32) && (GATE_ARCH != GATE_ARCH_ARM64)
# include <vld.h>
#endif
static gate::bool_t run_app_tests = false;
static gate::bool_t run_app_tests_no_close = false;
namespace gate
{
namespace apps
{
class GATE_API_LOCAL VTest : public App
{
private:
Optional<ui::Host> uihost;
ui::Form form;
ui::Menu menu;
ui::Menu menuFile;
ui::Menu menuHelp;
ui::Toolbar tb;
ui::Treeview treeview;
ui::Listview listview;
ui::TabControl tabs;
ui::Listbox lstbox;
ui::Textbox txtMulti;
ui::Statusbar sbStatus;
ui::Label lbl;
ui::Button btn;
ui::Textbox txtSimple;
ui::Checkbox chk;
ui::Combobox cmb;
ui::Progressbar pgb;
ui::PaintSurface painter;
ui::FramePanel frame;
ui::Button btn2;
ui::Layout layout;
ui::Layout tabLayout;
ui::Layout tabLayout2;
ui::Timer testTimer1;
gate::enumint_t testState;
graph::RasterImage imageApplication;
static gate::uint16_t const MenuKey_FileInfo = 0x01;
static gate::uint16_t const MenuKey_FileExit = 0x0f;
static gate::uint16_t const MenuKey_HelpAbout = 0x91;
graph::RasterImage& getAppImage()
{
if (this->imageApplication.empty())
{
graph::PixmapImages::parse(this->imageApplication, gate_icon_application_xpm);
}
return this->imageApplication;
}
void commandExit()
{
this->uihost->quit();
}
void commandHelp()
{
ui::MessageDialog msg;
msg.show(this->form, "Sample message text", "Sample title");
}
void Form_Closed(ui::Form* sender, ui::EventArg* arg)
{
this->commandExit();
}
void btn_Clicked(ui::Button* sender, ui::EventArg* arg)
{
String oldText = this->btn.getText();
String txt = this->txtSimple.getText();
if (txt != oldText)
{
this->btn.setText(txt);
}
}
void chk_Clicked(ui::Checkbox* sender, ui::EventArg* arg)
{
static StaticString const checkedText = "Checkbox is checked";
static StaticString const uncheckedText = "Checkbox is unchecked";
bool_t const checked = this->chk.isChecked();
String const newText = checked ? checkedText : uncheckedText;
String oldText = this->chk.getText();
if (oldText != newText)
{
this->chk.setText(newText);
}
}
void btn2_Clicked(ui::Button* sender, ui::EventArg* arg)
{
ui::MessageDialog msgDlg;
ui::InputDialog inDlg;
Optional<String> inputText = inDlg.show(this->form, "Tell me:", "Input Dialog");
if(inputText.empty())
{
msgDlg.show(this->form, "No Input!", "Warning");
}
else
{
msgDlg.show(this->form, *inputText, "Your Input:");
}
}
void tb_Clicked(ui::Toolbar* sender, ui::Toolbar::ToolbarEventArg* arg)
{
}
void treeview_Select(ui::Treeview* sender, ui::Treeview::ItemArg* arg)
{
String text = this->treeview.getItemText(arg->Item);
this->treeview.getItemParam(arg->Item);
this->sbStatus.setText(text);
}
void listview_Select(ui::Listview* sender, ui::Listview::IndexArg* arg)
{
String text = this->listview.getItemText(arg->ListIndex);
this->listview.getItemParam(arg->ListIndex);
this->sbStatus.setText(text);
}
void painter_Paint(ui::PaintSurface* sender, ui::PaintSurface::PaintEventArg* arg)
{
arg->Context.rect(arg->DrawRectangle, ui::Color::Blue, 0, ui::Color::Blue);
int32_t w = arg->DrawRectangle.getWidth();
int32_t h = arg->DrawRectangle.getHeight();
int32_t mx = w / 2;
int32_t my = h / 2;
ArrayList<ui::Point> points;
points
<< ui::Point(0, my)
<< ui::Point(mx, 0)
<< ui::Point(w, my)
<< ui::Point(mx, h)
<< ui::Point(0, my)
;
arg->Context.polygon(points.toArray(), ui::Color::Yellow, 2);
try {
arg->Context.getPixel(ui::Point(mx, my));
} catch(...) { }
arg->Context.setPixel(ui::Point(mx, my), ui::Color::White);
arg->Context.line(ui::Point(0, my), ui::Point(w, my), ui::Color::Yellow, 2);
arg->Context.line(ui::Point(mx, 0), ui::Point(mx, h), ui::Color::Yellow, 2);
graph::RasterImage& image = this->getAppImage();
ui::Graphics imageGraph(*this->uihost, image);
ui::Graphics virtualGraph(*this->uihost,
static_cast<uint32_t>(imageGraph.getWidth()),
static_cast<uint32_t>(imageGraph.getHeight()));
virtualGraph.drawEx(imageGraph);
arg->Context.draw(imageGraph, ui::Point(mx, my));
ui::Font font = this->uihost->getDefaultFont(ui::Host::FontType_Standard);
font.setColor(ui::Color::White);
static StaticString text = "Hello";
ui::Size sz = arg->Context.getTextSize(font, text);
ui::Position pos(mx - sz.width, my - sz.height, sz.width, sz.height);
arg->Context.print(font, text, pos);
}
void handleMenuAction(gate_uint16_t menuid)
{
if (menuid == MenuKey_FileExit) { this->commandExit(); }
else if (menuid == MenuKey_FileInfo) { this->commandHelp(); }
else if (menuid == MenuKey_HelpAbout) { this->commandHelp(); }
}
void Form_Menu(ui::Form* sender, ui::MenuArg* arg)
{
this->handleMenuAction(arg->MenuEntry.id);
}
void useControlProperties(ui::Control& ctrl)
{
if (ctrl.isCreated())
{
ui::Position pos = ctrl.getPosition();
ui::Size sz = ctrl.getSize();
ctrl.setPosition(pos);
ctrl.setEnabled(ctrl.isEnabled());
ctrl.isVisible();
ctrl.setVisible(true);
if (ctrl.isFocused())
{
ctrl.setFocus();
}
}
}
void timer1_Elapsed(ui::Timer* sender, ui::Timer::TimerArg* arg)
{
gate::enumint_t const state = ++this->testState;
if (state == 1)
{
useControlProperties(this->txtSimple);
useControlProperties(this->btn);
useControlProperties(this->chk);
this->txtSimple.setText("Hello");
this->lbl.performAction(ui::Label::Action_Activate);
this->btn.performAction(ui::Button::Action_Activate);
{
uint32_t mini, maxi;
mini = this->pgb.getMinimum();
maxi = this->pgb.getMaximum();
this->pgb.getMinMax(mini, maxi);
this->pgb.getValue();
this->pgb.setValue((mini + maxi) / 2);
this->pgb.setPercent(50.0f);
}
{
this->chk.setChecked(!this->chk.isChecked());
this->chk.performAction(ui::Checkbox::Action_Activate);
}
{
size_t const cnt = this->cmb.getItemCount();
this->cmb.setSelectedItem(cnt - 1);
gate_size_t selIndex = 0;
String selText;
void* selParam = NULL;
this->cmb.getSelectedItem(&selIndex, &selText, &selParam);
selParam = this->cmb.getItemParam(selIndex);
selText = this->cmb.getItemText(selIndex);
String const newText = selText + "!";
this->cmb.setItemText(selIndex, newText);
this->cmb.setSelectedItem(cnt - 1);
this->cmb.performAction(ui::Combobox::Action_Activate);
gate_size_t foundIndex = 0;
this->cmb.findItemParam(selParam, foundIndex);
}
{
gate_size_t index = this->lstbox.getItemCount();
this->lstbox.setSelectedItem(1);
this->lstbox.getSelectedItem(index);
String const text = this->lstbox.getItemText(index);
String const newText = text + "!";
this->lstbox.setItemText(index, newText);
void* const param = this->lstbox.getItemParam(index);
this->lstbox.findItemParam(param);
}
{
if (this->listview.getItemCount() > 0)
{
size_t ndx = 0;
this->listview.setItemSelected(ndx, true);
this->listview.getSelectedItem(ndx);
String oldText = this->listview.getItemText(ndx, 1);
String newText = oldText + "!";
this->listview.setItemText(ndx, newText, 1);
this->listview.getSelectedItems();
this->listview.setItemChecked(ndx, false);
this->listview.getCheckedItems();
void* param = this->listview.getItemParam(ndx);
ndx = this->listview.findItemParam(param);<--- Variable 'ndx' is assigned a value that is never used.
this->listview.insertItem(0, "Prequel");
}
}
{
Array<ui::Treeview::item_t> children = this->treeview.getItemChildren(0);
for(size_t ndx = 0; ndx != children.length(); ++ndx)
{
ui::Treeview::item_t parent = 0;
ui::Treeview::item_t child = children[ndx];
String oldText = this->treeview.getItemText(child);
String newText = oldText + "!";
this->treeview.setItemText(child, newText);
this->treeview.getItemParam(child);
this->treeview.getParentItem(child, parent);
this->treeview.getSelectedItem(parent);
}
}
}
else if (state == 2)
{
size_t const tabCount = this->tabs.getTabCount();
if (tabCount > 0)
{
this->tabs.setSelected(0);
for (size_t ndx = 0; ndx != tabCount; ++ndx)
{
String oldText = this->tabs.getTabText(ndx);
String newText = oldText + "!";
this->tabs.setTabText(ndx, newText);
}
size_t selected = this->tabs.getSelected();
if (selected < tabCount)
{
this->tabs.setSelected(selected + 1);
}
}
}
else if (state == 3)
{
this->tabs.setSelected(3);
this->painter.redraw();
}
else
{
sender->stop();
if (!run_app_tests_no_close)
{
this->uihost->quit();
}
}
}
public:
VTest()
: testState(0)
{
menuFile.add("Info", MenuKey_FileInfo);
menuFile.addSeparator();
menuFile.add("Exit", MenuKey_FileExit);
menuHelp.add("About", MenuKey_HelpAbout);
menu.add("File", 0, 0, &menuFile);
menu.add("Help", 0, 0, &menuHelp);
this->form.MenuEvent += ui::Form::MenuEventHandler(this, &VTest::Form_Menu);
this->btn.ClickEvent += ui::Button::ClickEventHandler(this, &VTest::btn_Clicked);
this->chk.ClickEvent += ui::Checkbox::ClickEventHandler(this, &VTest::chk_Clicked);
this->btn2.ClickEvent += ui::Button::ClickEventHandler(this, &VTest::btn2_Clicked);
this->tb.ClickEvent += ui::Toolbar::ClickEventHandler(this, &VTest::tb_Clicked);
this->treeview.SelectEvent += ui::Treeview::SelectEventHandler(this, &VTest::treeview_Select);
this->listview.SelectEvent += ui::Listview::SelectEventHandler(this, &VTest::listview_Select);
this->painter.PaintEvent += ui::PaintSurface::PaintEventHandler(this, &VTest::painter_Paint);
this->testTimer1.IntervalEvent += ui::Timer::IntervalEventHandler(this, &VTest::timer1_Elapsed);
}
~VTest() noexcept
{
}
virtual void onInit()
{
this->uihost.emplace<uintptr_t const>(this->getHandle());
this->layout.clear();
this->layout.setBorder(1);
this->layout.setRowSpace(3);
this->layout.setColumnSpace(3);
uint32_t colLeft = this->layout.addColumn(ui::Layout::Type_UnitScale, 8.0f);
uint32_t colMid = this->layout.addColumn();
uint32_t colRight = this->layout.addColumn(ui::Layout::Type_Percent, 25.0f);
uint32_t rowTop = this->layout.addRow(ui::Layout::Type_UnitScale, 2.00f);
uint32_t rowData1 = this->layout.addRow();
uint32_t rowData2 = this->layout.addRow();
uint32_t rowBottom = this->layout.addRow(ui::Layout::Type_UnitScale, 1.00f);
this->layout.setControl(this->tb, rowTop, colLeft, 1, 3);
this->layout.setControl(this->treeview, rowData1, colLeft);
this->layout.setControl(this->listview, rowData2, colLeft);
this->layout.setControl(this->tabs, rowData1, colMid, 2, 1);
this->layout.setControl(this->lstbox, rowData1, colRight);
this->layout.setControl(this->txtMulti, rowData2, colRight);
this->layout.setControl(this->sbStatus, rowBottom, colLeft, 1, 3);
this->form.CloseEvent += ui::Form::CloseEventHandler(this, &VTest::Form_Closed);
this->form.create(*this->uihost, NULL, String::createStaticFrom("vTest"),
ui::Form::Flag_Enabled | ui::Form::Flag_Resizable | ui::Form::Flag_Maximizable | ui::Form::Flag_Minimizable
//| ui::Form::Flag_Visible
);
this->form.setMenu(&this->menu);
ui::Position stdPos(10, 10, 10, 10);
this->tb.create(this->form, stdPos);
{
ui::RasterImage& image = this->getAppImage();
this->tb.add(image, NULL);
}
this->sbStatus.create(this->form, ui::Position(10, 10, 10, 10), "StatusBAR");
this->txtMulti.create(this->form, stdPos, "Hello" GATE_STR_NEWLINE "world",
ui::Textbox::Flag_Enabled | ui::Textbox::Flag_Visible | ui::Textbox::Flag_Multiline);
{
this->lstbox.create(this->form, stdPos);
this->lstbox.removeAllItems();
this->lstbox.addItem("Hello");
this->lstbox.addItem("World");
for (uint32_t n = 0; n < 25; ++n)
{
this->lstbox.addItem("Entry #" + numbers::to_string(n));
}
for (uint32_t n = 0; n < 5; ++n)
{
size_t count = this->lstbox.getItemCount();
this->lstbox.removeItem(count - 1);
}
}
{
this->treeview.create(this->form, ui::Position(10, 10, 10, 10));
ui::Treeview::item_t root = this->treeview.addItem(NULL, "MyRoot");
this->treeview.addItem(&root, "Sub1");
this->treeview.addItem(&root, "Sub2");
ui::Treeview::item_t s3 = this->treeview.addItem(&root, "Sub3");
this->treeview.removeItem(s3);
this->treeview.collapseItem(root);
this->treeview.expandItem(root);
}
{
this->listview.create(this->form, ui::Position(10, 10, 10, 10));
this->listview.removeAllItems();
ArrayList<ui::Listview::Column> cols;
cols.add(ui::Listview::Column("First", 60));
cols.add(ui::Listview::Column("Second", 100));
cols.add(ui::Listview::Column("Third", 200));
this->listview.setColumns(cols.toArray());
this->listview.beginTransaction();
for (uint32_t n = 0; n < 25; ++n)
{
void* param = reinterpret_cast<void*>(static_cast<uintptr_t>(n));
size_t index = this->listview.addItem("Entry #" + numbers::to_string(n), param);
this->listview.setItemText(index, "SubItem " + numbers::to_string(n), 1);
}
this->listview.endTransaction();
this->listview.setItemSelected(0, true);
for (uint32_t n = 0; n < 5; ++n)
{
size_t count = this->listview.getItemCount();
this->listview.removeItem(count - 1);
}
}
{
this->tabs.create(this->form, ui::Position(10, 10, 10, 10));
this->tabs.addTab("Tab1");
this->tabs.addTab("Tab2");
this->tabs.addTab("Tab3");
this->tabs.addTab("Tab4");
this->tabs.addTab("Tab5");
this->tabs.removeTab(this->tabs.getTabCount() - 1);
}
{
ui::TabPanel panel1 = this->tabs.getTabPanel(0);
this->lbl.create(panel1, ui::Position(0, 0, 128, 28), "Label");
this->chk.create(panel1, ui::Position(0, 32, 128, 32), "CheckMe", true);
}
{
ui::TabPanel panel2 = this->tabs.getTabPanel(1);
this->tabLayout.clear();
uint32_t tabLeft = this->tabLayout.addColumn();
uint32_t tabRight = this->tabLayout.addColumn();
uint32_t tabTop = this->tabLayout.addRow(ui::Layout::Type_UnitScale, 1.0f);
this->tabLayout.setControl(this->txtSimple, tabTop, tabLeft);
this->tabLayout.setControl(this->btn, tabTop, tabRight);
this->btn.create(panel2, ui::Position(0, 0, 120, 28), "PushButton");
this->txtSimple.create(panel2, ui::Position(0, 32, 120, 32), "TextField");
panel2.setLayout(&this->tabLayout);
}
{
ui::TabPanel panel3 = this->tabs.getTabPanel(2);
this->tabLayout2.clear();
this->tabLayout2.addColumn();
this->tabLayout2.addRow();
this->tabLayout2.setControl(this->frame, 0, 0);
this->frame.create(panel3, ui::Position(0, 0, 140, 96), "Frame");
this->btn2.create(this->frame, ui::Position(0, 0, 120, 64), "Test Input Dialog");
{
this->cmb.create(this->frame, ui::Position(0, 64, 128, 32));
//this->cmb.removeAllItems();
size_t index1 = this->cmb.addItem("entry_1");
size_t index2 = this->cmb.addItem("entry_2");<--- Variable 'index2' is assigned a value that is never used.
size_t index3 = this->cmb.addItem("entry_3");
this->cmb.removeItem(index3);
this->cmb.setSelectedItem(index1);
}
{
this->pgb.create(this->frame, ui::Position(0, 100, 128, 24));
this->pgb.setMinMax(0, 100);
this->pgb.setValue(75);
this->pgb.setValue(33);
}
panel3.setLayout(&this->tabLayout2);
}
{
ui::TabPanel panel3 = this->tabs.getTabPanel(3);
this->painter.create(panel3, ui::Position(0, 0, 160, 120));
}
this->form.setLayout(&this->layout);
this->form.setVisible(true);
if(run_app_tests)
{
this->testTimer1.create(this->form);
this->testTimer1.start(1000);
}
}
void onUninit()
{
if(this->testTimer1.isCreated())
{
this->testTimer1.destroy();
}
this->form.destroy();
this->uihost.reset();
}
virtual void run()
{
this->uihost->run();
this->onUninit();
}
};
} // end of namespace apps
} // end of namespace gate
int gate_main(char const* program, char const* const* arguments, gate_size_t argcount, gate_uintptr_t apphandle)
{
gate::apps::VTest vtest;
if (argcount > 0)
{
if (0 == gate_str_comp_ic(arguments[0], "--runtests"))
{
run_app_tests = true;
}
if (argcount > 1)
{
if (0 == gate_str_comp_ic(arguments[1], "--noclose"))
{
run_app_tests_no_close = true;
}
}
}
int exitcode = gate::App::runApp(vtest, program, arguments, argcount, apphandle);
return exitcode;
}
|