Flv_CStyle.H 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // ======================================================================
  2. // File: Flv_Style.H - Flv_Style definition
  3. // Program: Flv_Style - FLTK Virtual List/Table Styles Widget
  4. // Version: 0.1.0
  5. // Started: 11/21/99
  6. //
  7. // Copyright (C) 1999 Laurence Charlton
  8. //
  9. // Description:
  10. // This has nothing to do with styles and themes being implemented
  11. // in FLTK 2.0 the name is just coincidental. We will however try to use
  12. // true 2.0 style information as much as possible.
  13. //
  14. // The virtual style classes are designed to handle style informaton for
  15. // the Flv_List class and derivatives. (Although anyone could use
  16. // them) The concept of virtual styles is to create a trickle down style
  17. // protocol that allows only defined attributes to be created. The trickle
  18. // down is as follows:
  19. // Global style
  20. // Row style
  21. // Column style
  22. // Cell style
  23. //
  24. // Note: Global Style will be a Flv_Cell_Style since that will
  25. // maximally define attributes for the table.
  26. // The global style will inherit whatever the current style information
  27. // dictates, so it will be completely defined. (Whether it used in 1.x or 2.x
  28. // FLTK. From there we will only require definition of styles where you
  29. // need them. For instance:
  30. // If you want to override the header and footer styles and redefine
  31. // 5 column layouts, you will have a total of 8 styles defined:
  32. // 1 global style (always defined)
  33. // 2 row styles
  34. // 5 column styles
  35. //
  36. // Hopefully only requiring the styles you really want to define will help
  37. // offset the fact that it just takes memory to do this... :)
  38. // Of course you could choose not to define any styles and then you'll just
  39. // have the global style defined. But you know the table is pretty bare...
  40. // ======================================================================
  41. #ifndef FLV_CSTYLE_H
  42. #define FLV_CSTYLE_H
  43. #include <FL/Fl.H>
  44. #ifdef FLTK_2
  45. #include <FL/Fl_Font.H>
  46. #endif
  47. #include <FL/Flv_Style.H>
  48. class FL_EXPORT Flv_CStyle : public Flv_Style
  49. {
  50. public:
  51. Flv_CStyle();
  52. int x(void) const // Get x
  53. {
  54. return vx;
  55. };
  56. int x(int n); // Set x
  57. int y(void) const // Get y
  58. {
  59. return vy;
  60. };
  61. int y(int n); // Set y
  62. const Flv_CStyle &operator=(const Flv_CStyle &n);
  63. private:
  64. int vx, vy; // Row relative cell location
  65. };
  66. #endif