Line 120... |
Line 120... |
120 |
void regCallbackBatteryState(std::function<void (int level, bool charging, int chargeType)> callBatteryState, ulong handle);
|
120 |
void regCallbackBatteryState(std::function<void (int level, bool charging, int chargeType)> callBatteryState, ulong handle);
|
121 |
void unregCallbackBatteryState(ulong handle);
|
121 |
void unregCallbackBatteryState(ulong handle);
|
122 |
void regCallbackResetSurface(std::function<void ()> resetSurface) { _resetSurface = resetSurface; }
|
122 |
void regCallbackResetSurface(std::function<void ()> resetSurface) { _resetSurface = resetSurface; }
|
123 |
void regCallbackShutdown(std::function<void ()> shutdown) { _shutdown = shutdown; }
|
123 |
void regCallbackShutdown(std::function<void ()> shutdown) { _shutdown = shutdown; }
|
124 |
void regCallbackPlaySound(std::function<void (const std::string& file)> playSound) { _playSound = playSound; }
|
124 |
void regCallbackPlaySound(std::function<void (const std::string& file)> playSound) { _playSound = playSound; }
|
- |
|
125 |
void regSendVirtualKeys(std::function<void (const std::string& str)> sendVirtualKeys) { _sendVirtualKeys = sendVirtualKeys; }
|
125 |
|
126 |
|
126 |
/**
|
127 |
/**
|
127 |
* The following function must be called to start non graphics part
|
128 |
* The following function must be called to start non graphics part
|
128 |
* of the panel simulator. If everything worked well, it returns TRUE.
|
129 |
* of the panel simulator. If everything worked well, it returns TRUE.
|
129 |
* otherwise a FALSE is returned and the program should be terminated.
|
130 |
* otherwise a FALSE is returned and the program should be terminated.
|
Line 222... |
Line 223... |
222 |
*/
|
223 |
*/
|
223 |
void externalButton(extButtons_t bt, bool checked);
|
224 |
void externalButton(extButtons_t bt, bool checked);
|
224 |
void sendKeyboard(const std::string& text);
|
225 |
void sendKeyboard(const std::string& text);
|
225 |
void sendKeypad(const std::string& text);
|
226 |
void sendKeypad(const std::string& text);
|
226 |
void sendString(uint handle, const std::string& text);
|
227 |
void sendString(uint handle, const std::string& text);
|
- |
|
228 |
void sendKeyStroke(char key);
|
227 |
/**
|
229 |
/**
|
228 |
* This starts the communication with the AMX controller. The method
|
230 |
* This starts the communication with the AMX controller. The method
|
229 |
* registers the callbacks and starts a thread. This thread runs as
|
231 |
* registers the callbacks and starts a thread. This thread runs as
|
230 |
* long as a valid communication is possible or until the communication
|
232 |
* long as a valid communication is possible or until the communication
|
231 |
* end by a command.
|
233 |
* end by a command.
|
Line 241... |
Line 243... |
241 |
std::function<void (Button::TButton *button, Button::BITMAP_t& bm)> getCallbackInputText() { return _callInputText; }
|
243 |
std::function<void (Button::TButton *button, Button::BITMAP_t& bm)> getCallbackInputText() { return _callInputText; }
|
242 |
std::function<void (ulong handle, int left, int top, int width, int height, ANIMATION_t animate)> getCallbackSetSubPage() { return _setSubPage; }
|
244 |
std::function<void (ulong handle, int left, int top, int width, int height, ANIMATION_t animate)> getCallbackSetSubPage() { return _setSubPage; }
|
243 |
std::function<void (ulong handle)> getCallDropPage() { return _callDropPage; }
|
245 |
std::function<void (ulong handle)> getCallDropPage() { return _callDropPage; }
|
244 |
std::function<void (ulong handle)> getCallDropSubPage() { return _callDropSubPage; }
|
246 |
std::function<void (ulong handle)> getCallDropSubPage() { return _callDropSubPage; }
|
245 |
std::function<void (const std::string& file)> getCallPlaySound() { return _playSound; }
|
247 |
std::function<void (const std::string& file)> getCallPlaySound() { return _playSound; }
|
- |
|
248 |
std::function<void (const std::string& str)> sendVirtualKeys() { return _sendVirtualKeys; }
|
246 |
|
249 |
|
247 |
bool havePlaySound() { return _playSound != nullptr; }
|
250 |
bool havePlaySound() { return _playSound != nullptr; }
|
248 |
TSystemDraw *getSystemDraw() { return mSystemDraw; }
|
251 |
TSystemDraw *getSystemDraw() { return mSystemDraw; }
|
249 |
void reset();
|
252 |
void reset();
|
- |
|
253 |
bool getPassThrough() { return mPassThrough; }
|
250 |
|
254 |
|
251 |
protected:
|
255 |
protected:
|
252 |
PAGELIST_T findPage(const std::string& name);
|
256 |
PAGELIST_T findPage(const std::string& name);
|
253 |
PAGELIST_T findPage(int ID);
|
257 |
PAGELIST_T findPage(int ID);
|
254 |
SUBPAGELIST_T findSubPage(const std::string& name);
|
258 |
SUBPAGELIST_T findSubPage(const std::string& name);
|
Line 278... |
Line 282... |
278 |
std::function<void ()> _callResetKeyboard{nullptr};
|
282 |
std::function<void ()> _callResetKeyboard{nullptr};
|
279 |
std::function<void ()> _callShowSetup{nullptr};
|
283 |
std::function<void ()> _callShowSetup{nullptr};
|
280 |
std::function<void ()> _resetSurface{nullptr};
|
284 |
std::function<void ()> _resetSurface{nullptr};
|
281 |
std::function<void ()> _shutdown{nullptr};
|
285 |
std::function<void ()> _shutdown{nullptr};
|
282 |
std::function<void (const std::string& file)> _playSound{nullptr};
|
286 |
std::function<void (const std::string& file)> _playSound{nullptr};
|
- |
|
287 |
std::function<void (const std::string& str)> _sendVirtualKeys{nullptr};
|
283 |
|
288 |
|
284 |
/**
|
289 |
/**
|
285 |
* @brief doOverlap checks for overlapping objects
|
290 |
* @brief doOverlap checks for overlapping objects
|
286 |
*
|
291 |
*
|
287 |
* The function checks whether some objects on the surface overlap or
|
292 |
* The function checks whether some objects on the surface overlap or
|
Line 409... |
Line 414... |
409 |
void doTXT(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
414 |
void doTXT(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
410 |
void getTXT(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
415 |
void getTXT(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
411 |
void doUNI(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
416 |
void doUNI(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
412 |
void doUTF(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
417 |
void doUTF(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
413 |
|
418 |
|
- |
|
419 |
void doKPS(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
- |
|
420 |
void doVKS(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
- |
|
421 |
|
414 |
void doBBR(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
422 |
void doBBR(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
415 |
void doRAF(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
423 |
void doRAF(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
416 |
void doRFR(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
424 |
void doRFR(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
417 |
void doRMF(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
425 |
void doRMF(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
- |
|
426 |
void doRSR(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
418 |
|
427 |
|
419 |
void doAKB(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
428 |
void doAKB(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
420 |
void doAKEYB(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
429 |
void doAKEYB(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
421 |
void doAKP(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
430 |
void doAKP(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
422 |
void doAKEYP(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
431 |
void doAKEYP(int port, std::vector<int>& channels, std::vector<std::string>& pars);
|
Line 455... |
Line 464... |
455 |
std::vector<amx::ANET_COMMAND> mCommands; // Command queue of commands received from controller
|
464 |
std::vector<amx::ANET_COMMAND> mCommands; // Command queue of commands received from controller
|
456 |
bool mBusy{false}; // Internal used to block the command handler
|
465 |
bool mBusy{false}; // Internal used to block the command handler
|
457 |
std::string mCmdBuffer; // Internal used buffer for commands who need more than one network package
|
466 |
std::string mCmdBuffer; // Internal used buffer for commands who need more than one network package
|
458 |
std::string mAkbText; // This is the text for the virtual keyboard (@AKB)
|
467 |
std::string mAkbText; // This is the text for the virtual keyboard (@AKB)
|
459 |
std::string mAkpText; // This is the text for the virtual keyad (@AKP)
|
468 |
std::string mAkpText; // This is the text for the virtual keyad (@AKP)
|
- |
|
469 |
bool mPassThrough{false}; // Can ve set to true with the command ^KPS
|
460 |
#ifdef _SCALE_SKIA_
|
470 |
#ifdef _SCALE_SKIA_
|
461 |
double mScaleFactor{1.0}; // The scale factor to zoom or shrink all components
|
471 |
double mScaleFactor{1.0}; // The scale factor to zoom or shrink all components
|
462 |
double mScaleFactorWidth{1.0}; // The individual scale factor for the width
|
472 |
double mScaleFactorWidth{1.0}; // The individual scale factor for the width
|
463 |
double mScaleFactorHeight{1.0}; // The individual scale factor for the height
|
473 |
double mScaleFactorHeight{1.0}; // The individual scale factor for the height
|
464 |
#endif
|
474 |
#endif
|