KEDEditor.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. #pragma once
  2. #include <Liste.h>
  3. #include <Bild.h>
  4. #include <Knopf.h>
  5. #include <DateiDialog.h>
  6. #include <Fenster.h>
  7. #include <AuswahlBox.h>
  8. #include <M2DVorschau.h>
  9. #include "KEDModel2DEditor.h"
  10. #include <GSLSoundV.h>
  11. using namespace Framework;
  12. class KEDBildSeite
  13. {
  14. private:
  15. AuswahlListe *bilder;
  16. BildZ *bildObj;
  17. Knopf *bildLöschen;
  18. Knopf *importieren;
  19. Knopf *dateiLöschen;
  20. Knopf *neueDatei;
  21. DateiDialogTh *importDialog;
  22. Text *importPfad;
  23. int aktion;
  24. bool sichtbar;
  25. unsigned char alpha;
  26. unsigned char alpha2;
  27. double tickVal;
  28. int ref;
  29. public:
  30. // Konstruktor
  31. KEDBildSeite( Schrift *zSchrift, Knopf *zNeueDatei, Knopf *zDateiRemove );
  32. // Destruktor
  33. ~KEDBildSeite();
  34. // nicht constant
  35. int getAktion();
  36. void setBildListe( RCArray< Text > *list );
  37. void setBild( Bild *b );
  38. void setSichtbar( bool s );
  39. bool tick( double tv );
  40. void doMausEreignis( MausEreignis &me );
  41. void render( Bild &zRObj );
  42. // constant
  43. Text *zBildImportPfad() const;
  44. Text *zBildAuswahl() const;
  45. // Reference Counting
  46. KEDBildSeite *getThis();
  47. KEDBildSeite *release();
  48. };
  49. class KEDModellSeite
  50. {
  51. private:
  52. AuswahlListe *modelle;
  53. M2DVorschau *modelObj;
  54. Knopf *modelLöschen;
  55. Knopf *neuesModel;
  56. Knopf *dateiLöschen;
  57. Knopf *neueDatei;
  58. Knopf *bearbeiten;
  59. Model2DEditor::GUI *editor;
  60. Fenster *neuModelF;
  61. TextFeld *neuModelName;
  62. Knopf *neuModelOk;
  63. AuswahlListe *dateien;
  64. int aktion;
  65. bool sichtbar;
  66. unsigned char alpha;
  67. unsigned char alpha2;
  68. unsigned char alpha3;
  69. double tickVal;
  70. int ref;
  71. public:
  72. // Konstruktor
  73. KEDModellSeite( Schrift *zSchrift, Knopf *zNeueDatei, Knopf *zDateiRemove, AuswahlListe *dateien );
  74. // Destruktor
  75. ~KEDModellSeite();
  76. // nicht constant
  77. int getAktion();
  78. bool neuModelOkME( MausEreignis &me );
  79. void setModelListe( RCArray< Text > *list );
  80. void setModel( Model2DData *mdl );
  81. void setSichtbar( bool s );
  82. bool tick( double tv );
  83. void doMausEreignis( MausEreignis &me );
  84. void doTastaturEreignis( TastaturEreignis &me );
  85. void render( Bild &zRObj );
  86. // constant
  87. Text *zModelAuswahl() const;
  88. Text *zNeuModelName() const;
  89. Model2DData *getModelData() const;
  90. // Reference Counting
  91. KEDModellSeite *getThis();
  92. KEDModellSeite *release();
  93. };
  94. class KEDSoundSeite
  95. {
  96. private:
  97. AuswahlListe *sounds;
  98. GSL::GSLSoundV *sound;
  99. Knopf *soundLöschen;
  100. Knopf *importieren;
  101. Knopf *dateiLöschen;
  102. Knopf *neueDatei;
  103. Knopf *play;
  104. DateiDialogTh *importDialog;
  105. Text *importPfad;
  106. int aktion;
  107. bool sichtbar;
  108. unsigned char alpha;
  109. unsigned char alpha2;
  110. double tickVal;
  111. int ref;
  112. public:
  113. // Konstruktor
  114. KEDSoundSeite( Schrift *zSchrift, Knopf *zNeueDatei, Knopf *zDateiRemove );
  115. // Destruktor
  116. ~KEDSoundSeite();
  117. // nicht constant
  118. int getAktion();
  119. void setSoundListe( RCArray< Text > *list );
  120. void setSound( GSL::GSLSoundV *b );
  121. void setSichtbar( bool s );
  122. bool tick( double tv );
  123. void doMausEreignis( MausEreignis &me );
  124. void render( Bild &zRObj );
  125. // constant
  126. Text *zSoundImportPfad() const;
  127. Text *zSoundAuswahl() const;
  128. // Reference Counting
  129. KEDSoundSeite *getThis();
  130. KEDSoundSeite *release();
  131. };
  132. class KEDEditor : public Zeichnung
  133. {
  134. private:
  135. AuswahlListe *dateien;
  136. KEDBildSeite *bildSeite;
  137. KEDModellSeite *modelSeite;
  138. KEDSoundSeite *soundSeite;
  139. Fenster *neuDateiF;
  140. AuswahlBox *neuDateiTyp;
  141. TextFeld *neuDateiName;
  142. Knopf *neuDateiOk;
  143. Knopf *neueDatei;
  144. Knopf *dateiLöschen;
  145. int aktion;
  146. bool sichtbar;
  147. unsigned char alpha;
  148. unsigned char alpha2;
  149. double tickVal;
  150. int ref;
  151. public:
  152. // Konstruktor
  153. KEDEditor( Schrift *zSchrift );
  154. // Destruktor
  155. ~KEDEditor();
  156. // nicht constant
  157. int getAktion();
  158. bool neuDateiOkME( MausEreignis &me );
  159. void setDateiListe( RCArray< Text > *list );
  160. void setBildListe( RCArray< Text > *list );
  161. void setSoundListe( RCArray< Text > *list );
  162. void setModel2dListe( RCArray< Text > *list );
  163. void setBild( Bild *b );
  164. void setSound( GSL::GSLSoundV *s );
  165. void setModel2d( Model2DData *d );
  166. void setSichtbar( bool s );
  167. bool tick( double tv ) override;
  168. void doMausEreignis( MausEreignis &me ) override;
  169. void doTastaturEreignis( TastaturEreignis &te ) override;
  170. void render( Bild &zRObj ) override;
  171. // constant
  172. Text *zBildImportPfad() const;
  173. Text *zSoundImportPfad() const;
  174. Text *zDateiAuswahl() const;
  175. Text *zBildAuswahl() const;
  176. Text *zSoundAuswahl() const;
  177. Text *zModel2dAuswahl() const;
  178. Model2DData *getModelData() const;
  179. Text *zNeuModelName() const;
  180. int getNeuDateiTyp() const;
  181. Text *zNeuDateiName() const;
  182. bool istSichtbar() const;
  183. // Reference Counting
  184. KEDEditor *getThis();
  185. KEDEditor *release();
  186. };