X2 Standard  Version 1.28
Loading...
Searching...
No Matches
x2guiinterface.h
1#ifndef _X2GUIInterface_H
2#define _X2GUIInterface_H
3
4#define X2GUIInterface_Name "com.bisque.TheSkyX.X2GUIInterface/1.0"
5
6#ifdef THESKYX_FOLDER_TREE
7#include "driverrootinterface.h"
8#include "components/theskyxfacadefordrivers/theskyxfacadefordriversinterface.h"
9#else
10#include "../../licensedinterfaces/driverrootinterface.h"
11#include "../../licensedinterfaces/theskyxfacadefordriversinterface.h"
12#endif
13
23{
24public:
25
26 virtual ~X2GUIExchangeInterface (){}
27
28public:
30 virtual void setText(const char* pszObjectName, const char* pszValue) = 0;
32 virtual void text(const char* pszObjectName, char* pszOut, const int& nOutMaxSize) = 0;
33
35 virtual void setEnabled(const char* pszObjectName, const bool& bEnabled) = 0;
37 virtual bool isEnabled(const char* pszObjectName) = 0;
38
40 virtual void setCurrentIndex(const char* pszObjectName, const int & nValue) = 0;
42 virtual int currentIndex(const char* pszObjectName) = 0;
43
45 virtual void setChecked(const char* pszObjectName, const int & nValue) = 0;
47 virtual int isChecked(const char* pszObjectName) = 0;
48
50 virtual void comboBoxAppendString(const char* pszControlName, const char* pszValue) = 0;
51
53 virtual void tableWidgetSetItem(const char* pszControlName, const int& nRow, const int& nCol, const char* pszValue) = 0;
55 virtual void tableWidgetGetItem(const char* pszControlName, const int& nRow, const int& nCol, char* pszValue, const int& nOutMaxSize) = 0;
57 virtual void tableWidgetCurrentRow(const char* pszControlName, int& nRow) = 0;
59 virtual void tableWidgetCurrentCol(const char* pszControlName, int& nCol) = 0;
61 virtual void tableWidgetRemoveRow(const char* pszControlName, const int& nRow) = 0;
63 virtual void tableWidgetRemoveCol(const char* pszControlName, const int& nCol) = 0;
64
66 virtual void messageBox(const char* pszTitle, const char* pszMessage) = 0;
67
69 virtual bool invokeMethod(const char* pszObjectName, const char* pszMethodName,
70 char* pszReturn=NULL, const int& nReturnMaxSize=0,
71 const char* pszArg1=NULL)=0;
72
74 virtual void setPropertyString(const char* pszObjectName, const char* pszPropertyName, const char* pszValue) = 0;
76 virtual void propertyString(const char* pszObjectName, const char* pszPropertyName, char* pszOut, const int& nOutMaxSize) = 0;
77
79 virtual void setPropertyInt(const char* pszObjectName, const char* pszPropertyName, const int & nValue) = 0;
81 virtual void propertyInt(const char* pszObjectName, const char* pszPropertyName, int& nValue) = 0;
82
84 virtual void setPropertyDouble(const char* pszObjectName, const char* pszPropertyName, const double& dValue) = 0;
86 virtual void propertyDouble(const char* pszObjectName, const char* pszPropertyName, double& dValue) = 0;
87};
88
89#define X2GUIEventInterface_Name "com.bisque.TheSkyX.X2GUIEventInterface/1.0"
98{
99public:
100
102 virtual void uiEvent(X2GUIExchangeInterface* uiex, const char* pszEvent)=0;
103
104};
105
154
156{
157public:
158
159 virtual ~X2GUIInterface(){}
160
161public:
162 //X2GUIInterface
163
165 virtual int loadUserInterface(const char* pszFileName, const int& dt, const int& nISIndex)=0;
166
169
171 virtual int exec(bool& bPressedOK)=0;
172
173};
174
187{
188
189public:
192 {
193 m_pTheSkyX = pTheSkyX;
194 m_pX2UI = NULL;
195 m_pX2UIEvent = NULL;
196 if (pCaller)
197 pCaller->queryAbstraction(X2GUIEventInterface_Name, (void**)&m_pX2UIEvent);
198 X2UI();
199 }
200
203 {
204 int nErr;
205
206 if (NULL == m_pX2UI && m_pTheSkyX)
207 {
208 if ((nErr = m_pTheSkyX->doCommand(TheSkyXFacadeForDriversInterface::GET_X2UI, m_pX2UIEvent, &m_pX2UI)))
209 return NULL;
210 }
211 return m_pX2UI;
212 }
213
216 {
217 if (NULL != m_pX2UI)
218 {
219 return m_pX2UI->X2DX();
220 }
221 return NULL;
222 }
223
225 {
226 if (m_pTheSkyX)
227 {
228 if (m_pX2UI)
229 m_pTheSkyX->doCommand(TheSkyXFacadeForDriversInterface::UNGET_X2UI, NULL, &m_pX2UI);
230 }
231 }
232
233private:
234 TheSkyXFacadeForDriversInterface* m_pTheSkyX;
235 X2GUIInterface* m_pX2UI;
236 X2GUIEventInterface* m_pX2UIEvent;
237};
238
239#endif
The DriverRootInterface is the foundation for all X2 device drivers.
Definition driverrootinterface.h:21
virtual int queryAbstraction(const char *pszName, void **ppVal)=0
The TheSkyXFacadeForDriversInterface is a simplified interface to TheSkyX passed to X2 implementors.
Definition theskyxfacadefordriversinterface.h:19
virtual int doCommand(const int &command, void *pIn, void *pOut) const =0
The X2UIEventsInterface notifies X2 implementors when user interface events happen.
Definition x2guiinterface.h:98
virtual void uiEvent(X2GUIExchangeInterface *uiex, const char *pszEvent)=0
The X2GUIExchangeInterface provides the X2 developer the means to get and set data from a graphical u...
Definition x2guiinterface.h:23
virtual void tableWidgetSetItem(const char *pszControlName, const int &nRow, const int &nCol, const char *pszValue)=0
virtual void setPropertyDouble(const char *pszObjectName, const char *pszPropertyName, const double &dValue)=0
virtual int isChecked(const char *pszObjectName)=0
virtual void propertyInt(const char *pszObjectName, const char *pszPropertyName, int &nValue)=0
virtual void comboBoxAppendString(const char *pszControlName, const char *pszValue)=0
virtual void setText(const char *pszObjectName, const char *pszValue)=0
virtual void setPropertyInt(const char *pszObjectName, const char *pszPropertyName, const int &nValue)=0
virtual bool isEnabled(const char *pszObjectName)=0
virtual void setCurrentIndex(const char *pszObjectName, const int &nValue)=0
virtual void tableWidgetGetItem(const char *pszControlName, const int &nRow, const int &nCol, char *pszValue, const int &nOutMaxSize)=0
virtual void propertyString(const char *pszObjectName, const char *pszPropertyName, char *pszOut, const int &nOutMaxSize)=0
virtual void messageBox(const char *pszTitle, const char *pszMessage)=0
virtual void tableWidgetCurrentCol(const char *pszControlName, int &nCol)=0
virtual void tableWidgetRemoveRow(const char *pszControlName, const int &nRow)=0
virtual void tableWidgetRemoveCol(const char *pszControlName, const int &nCol)=0
virtual void setPropertyString(const char *pszObjectName, const char *pszPropertyName, const char *pszValue)=0
virtual void text(const char *pszObjectName, char *pszOut, const int &nOutMaxSize)=0
virtual void setEnabled(const char *pszObjectName, const bool &bEnabled)=0
virtual void tableWidgetCurrentRow(const char *pszControlName, int &nRow)=0
virtual void setChecked(const char *pszObjectName, const int &nValue)=0
virtual void propertyDouble(const char *pszObjectName, const char *pszPropertyName, double &dValue)=0
virtual bool invokeMethod(const char *pszObjectName, const char *pszMethodName, char *pszReturn=NULL, const int &nReturnMaxSize=0, const char *pszArg1=NULL)=0
virtual int currentIndex(const char *pszObjectName)=0
The X2GUIInterface allows X2 implementors to display a customized, cross platform,...
Definition x2guiinterface.h:156
virtual X2GUIExchangeInterface * X2DX()=0
virtual int exec(bool &bPressedOK)=0
virtual int loadUserInterface(const char *pszFileName, const int &dt, const int &nISIndex)=0
The X2ModalUIUtil class supplies the X2 developer with the X2GUIInterface interface.
Definition x2guiinterface.h:187
X2GUIExchangeInterface * X2DX()
Definition x2guiinterface.h:215
X2GUIInterface * X2UI()
Definition x2guiinterface.h:202
X2ModalUIUtil(DriverRootInterface *pCaller, TheSkyXFacadeForDriversInterface *pTheSkyX)
Definition x2guiinterface.h:191
X2 Examples
(C) 2026 Software Bisque, Inc. All rights reserved.