diff -r 11a0e8a2346e -r 7268128148b8 MainWindow.h --- a/MainWindow.h Wed May 21 22:55:14 2014 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ - - -#ifndef MAIN_WINDOW_H -#define MAIN_WINDOW_H - -#include -#include "hidapi.h" -#include "mac_support.h" -#include -#include -#include -#include "FutabaVfd.h" - -#ifdef _WIN32 -// Thanks Microsoft, but I know how to use strncpy(). -#pragma warning(disable:4996) -#endif - -class MainWindow : public FXMainWindow { - FXDECLARE(MainWindow) - -public: - enum { - ID_FIRST = FXMainWindow::ID_LAST, - ID_CONNECT, - ID_DISCONNECT, - ID_RESCAN, - ID_SEND_OUTPUT_REPORT, - ID_SEND_FEATURE_REPORT, - ID_GET_FEATURE_REPORT, - ID_CLEAR, - ID_TIMER, - ID_MAC_TIMER, - ID_FUTABA_CLEAR_DISPLAY, - ID_FUTABA_DIMMING, - ID_FUTABA_DISPLAY_DATA_INPUT, - ID_FUTABA_READ_ID, - ID_FUTABA_READ_FIRMWARE_REVISION, - ID_FUTABA_POWER_SUPPLY_MONITOR, - ID_FUTABA_SET_PIXEL, - ID_FUTABA_RESET_PIXEL, - ID_FUTABA_SET_ALL_PIXELS, - ID_SELECT_FONT, - ID_LAST - }; - - size_t getDataFromTextField(FXTextField *tf, char *buf, size_t len); - int getLengthFromTextField(FXTextField *tf); - -protected: - MainWindow() {}; -public: - MainWindow(FXApp *a); - ~MainWindow(); - virtual void create(); - - long onConnect(FXObject *sender, FXSelector sel, void *ptr); - long onDisconnect(FXObject *sender, FXSelector sel, void *ptr); - long onRescan(FXObject *sender, FXSelector sel, void *ptr); - long onSendOutputReport(FXObject *sender, FXSelector sel, void *ptr); - long onSendFeatureReport(FXObject *sender, FXSelector sel, void *ptr); - long onGetFeatureReport(FXObject *sender, FXSelector sel, void *ptr); - long onClear(FXObject *sender, FXSelector sel, void *ptr); - // - long onFutabaClearDisplay(FXObject *sender, FXSelector sel, void *ptr); - long onFutabaDimming(FXObject *sender, FXSelector sel, void *ptr); - long onFutabaDisplayDataInput(FXObject *sender, FXSelector sel, void *ptr); - long onFutabaReadId(FXObject *sender, FXSelector sel, void *ptr); - long onFutabaReadFirmwareRevision(FXObject *sender, FXSelector sel, void *ptr); - long onFutabaPowerSupplyMonitor(FXObject *sender, FXSelector sel, void *ptr); - long onFutabaSetAllPixels(FXObject *sender, FXSelector sel, void *ptr); - long onFutabaSetPixel(FXObject *sender, FXSelector sel, void *ptr); - long onFutabaResetPixel(FXObject *sender, FXSelector sel, void *ptr); - // - long onSelectFont(FXObject *sender, FXSelector sel, void *ptr); - // - long onTimeout(FXObject *sender, FXSelector sel, void *ptr); - long onMacTimeout(FXObject *sender, FXSelector sel, void *ptr); - // - void SetPixel(int aX, int aY, unsigned char aValue); - void SetPixelBlock(int aX, int aY, int aHeight, int aSize, unsigned char aValue); - -private: - FXList *device_list; - FXButton *connect_button; - FXButton *disconnect_button; - FXButton *rescan_button; - FXButton *output_button; - FXLabel *connected_label; - FXTextField *output_text; - FXTextField *output_len; - FXButton *feature_button; - FXButton *get_feature_button; - FXTextField *feature_text; - FXTextField *feature_len; - FXTextField *get_feature_text; - FXText *input_text; - FXFont *title_font; - //Futaba VFD control - FXButton *iButtonClearDisplay; - FXButton *iButtonDimming; - FXButton *iButtonDisplayDataInput; - FXButton *iButtonReadId; - FXButton *iButtonReadFirmwareRevision; - FXButton *iButtonPowerSupplyMonitor; - FXTextField *iTextFieldX; - FXTextField *iTextFieldY; - FXButton *iButtonSetPixel; - FXButton *iButtonResetPixel; - FXButton *iButtonSetAllPixels; - //Font - FXButton *iButtonSelectFont; - - unsigned char* iOutputReportBuffer; - unsigned char iDimming; //Current VFD dimming - FXFontDesc iCurrentFontDesc; - FXFont* iCurrentFont; - FXTGAImage* iFontImage; - - struct hid_device_info *devices; - hid_device *connected_device; - - //Futaba - GP1212A01A iVfd01; - -}; - -#endif // \ No newline at end of file