Menu

[b84aab]: / src / platform / common / interface.h  Maximize  Restore  History

Download this file

50 lines (42 with data), 1.3 kB

 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
// This file is part of SmallBASIC
//
// Copyright(C) 2001-2012 Chris Warren-Smith.
//
// This program is distributed under the terms of the GPL v2.0 or later
// Download the GNU Public License (GPL) from www.gnu.org
//
#ifndef INTERFACE_H
#define INTERFACE_H
#include "platform/common/StringLib.h"
struct IButtonListener {
virtual ~IButtonListener() {}
virtual void buttonClicked(const char *action) = 0;
};
struct IFormWidgetListModel {
virtual ~IFormWidgetListModel() {}
virtual const char *getTextAt(int index) = 0;
virtual int getIndex(const char *label) = 0;
virtual int rows() const = 0;
virtual int selected() const = 0;
virtual void selected(int index) = 0;
};
struct IFormWidget {
virtual ~IFormWidget() {}
virtual bool edit(int key) = 0;
virtual IFormWidgetListModel *getList() const = 0;
virtual const char *getText() const = 0;
virtual void setText(const char *text) = 0;
virtual void setListener(IButtonListener *listener) = 0;
virtual int getX() = 0;
virtual int getY() = 0;
virtual int getW() = 0;
virtual int getH() = 0;
virtual void setX(int x) = 0;
virtual void setY(int y) = 0;
virtual void setW(int w) = 0;
virtual void setH(int h) = 0;
};
namespace form_ui {
void optionsBox(StringList *items);
};
#endif
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.