Advertisement
Taz8du29

matrixEditor.h

Jan 18th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.39 KB | None | 0 0
  1. /* matrixEditor.h
  2.  *
  3.  * Main file's header containing definitions and library calls
  4.  *
  5.  * Copyright 2017 (C) Taz8du29
  6.  * Refer to LICENSE.md for more infos about copyright
  7. */
  8.  
  9.  
  10. #ifndef _MATRIXEDITOR_H_
  11. #define _MATRIXEDITOR_H_
  12.  
  13.  
  14. /* CLASS DECLARATIONS */
  15.  
  16. class Led;
  17. class Application;
  18.  
  19.  
  20.  
  21. /* DEPENDENCIES */
  22.  
  23. // Standard libraries
  24. #include <stdio.h>
  25. #include <stdlib.h>
  26. #include <stdint.h>
  27. #include <cstdlib>
  28.  
  29. // FLTK libraries
  30. #include <FL/Fl.H>
  31. #include <FL/Fl_Double_Window.H>
  32. #include <FL/Fl_Group.H>
  33. #include <FL/Fl_Toggle_Button.H>
  34. #include <FL/Fl_PNG_Image.H>
  35.  
  36. // Other files for this project
  37. #include "loggerField.h"
  38. #include "menuEntries.h"
  39.  
  40.  
  41.  
  42. /* CLASSES */
  43.  
  44. class Led : public Fl_Button {
  45. public:
  46.     Led(uint8_t index, bool state);
  47.     void invert(void);
  48.     int handle(int event);
  49.  
  50.     static const uint16_t dotSize = 48;
  51.     static const uint16_t lineSize = 384;
  52.  
  53.     uint8_t index;
  54.  
  55. private:
  56.     Fl_Image* led_on = new Fl_PNG_Image("images/led_on_48x48.png");
  57.     Fl_Image* led_off = new Fl_PNG_Image("images/led_off_48x48.png");
  58. };
  59.  
  60.  
  61. class Application {
  62. public:
  63.     Fl_Double_Window* makeWindow(void);
  64.  
  65.     static uint16_t sizeX;
  66.     static uint16_t sizeY;
  67.  
  68.     static LoggerField* logs;
  69.  
  70. private:
  71.     const char* label = "matrixEditor";
  72. };
  73.  
  74.  
  75.  
  76. /* C++ PROGRAM */
  77.  
  78. #include "matrixEditor.cpp"
  79.  
  80.  
  81. #endif  /* !_MATRIXEDITOR_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement