AuswahlBox.cpp 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207
  1. #include "AuswahlBox.h"
  2. #include "AlphaFeld.h"
  3. #include "Bild.h"
  4. #include "MausEreignis.h"
  5. #include "TastaturEreignis.h"
  6. #include "Rahmen.h"
  7. #include "Scroll.h"
  8. #include "TextFeld.h"
  9. #include "Knopf.h"
  10. #include "Text.h"
  11. #include "Schrift.h"
  12. #include "ToolTip.h"
  13. using namespace Framework;
  14. // Inhalt der AuswahlBox Klasse aus AuswahlBox.h
  15. // Konstruktor
  16. AuswahlBox::AuswahlBox()
  17. : ZeichnungHintergrund(),
  18. schrift( 0 ),
  19. msStyle( 0 ),
  20. members( new RCArray< TextFeld >() ),
  21. ausfahren( new Knopf() ),
  22. auswRahmen( new LRahmen() ),
  23. auswBgF( 0xFF000000 ),
  24. auswBgB( 0 ),
  25. auswAf( new AlphaFeld() ),
  26. msAuswRahmen( 0 ),
  27. msAuswBgF( 0 ),
  28. msAuswBgB( 0 ),
  29. msAuswAf( 0 ),
  30. mausRahmen( new LRahmen() ),
  31. mausBgF( 0xFF000000 ),
  32. mausBgB( 0 ),
  33. mausAf( new AlphaFeld() ),
  34. msMausRahmen( 0 ),
  35. msMausBgF( 0 ),
  36. msMausBgB( 0 ),
  37. msMausAf( 0 ),
  38. anzahl( 0 ),
  39. auswahl( 0 ),
  40. ausgeklappt( 0 ),
  41. ausklappHeight( 0 ),
  42. ausklapMaxHeight( 200 ),
  43. eintragHeight( 15 ),
  44. tickval( 0 ),
  45. mausEintrag( 0 ),
  46. scrollAnzeigen( 0 ),
  47. eAkP( 0 ),
  48. eAk( 0 ),
  49. ref( 1 )
  50. {
  51. vertikalScrollBar = new VScrollBar();
  52. style = Style::Normal;
  53. rahmen = new LRahmen();
  54. rahmen->setFarbe( 0xFFFFFFFF );
  55. rahmen->setRamenBreite( 1 );
  56. ausfahren->setStyle( Knopf::Style::Sichtbar | Knopf::Style::Erlaubt | Knopf::Style::KlickBuffer );
  57. ausfahren->setKBFarbe( 0xA0000000 );
  58. ausfahren->setKBStrength( 10 );
  59. ausfahren->setSize( 18, 18 );
  60. ausfahren->setSchriftFarbe( 0xFFFFFFFF );
  61. ausfahren->setText( "\\/" );
  62. auswRahmen->setFarbe( 0xFF00FF00 );
  63. auswRahmen->setRamenBreite( 1 );
  64. auswAf->setFarbe( 0xA000FF00 );
  65. auswAf->setStrength( 7 );
  66. mausRahmen->setFarbe( 0xFF00FF00 );
  67. mausRahmen->setRamenBreite( 1 );
  68. mausAf->setFarbe( 0x5000FF00 );
  69. mausAf->setStrength( 7 );
  70. gr.x = 20;
  71. gr.y = 20;
  72. }
  73. // Destruktor
  74. AuswahlBox::~AuswahlBox()
  75. {
  76. if( schrift )
  77. schrift->release();
  78. if( msStyle )
  79. msStyle->release();
  80. if( members )
  81. members->release();
  82. if( ausfahren )
  83. ausfahren->release();
  84. if( auswRahmen )
  85. auswRahmen->release();
  86. if( auswBgB )
  87. auswBgB->release();
  88. if( auswAf )
  89. auswAf->release();
  90. if( msAuswRahmen )
  91. msAuswRahmen->release();
  92. if( msAuswAf )
  93. msAuswAf->release();
  94. if( msAuswBgB )
  95. msAuswBgB->release();
  96. if( msAuswBgF )
  97. msAuswBgF->release();
  98. if( mausRahmen )
  99. mausRahmen->release();
  100. if( mausAf )
  101. mausAf->release();
  102. if( mausBgB )
  103. mausBgB->release();
  104. if( msMausRahmen )
  105. msMausRahmen->release();
  106. if( msMausAf )
  107. msMausAf->release();
  108. if( msMausBgB )
  109. msMausBgB->release();
  110. if( msMausBgF )
  111. msMausBgF->release();
  112. }
  113. // nicht constant
  114. void AuswahlBox::setEventParam( void *p ) // setzt den Event Parameter
  115. {
  116. eAkP = p;
  117. }
  118. void AuswahlBox::setEventAktion( void( *eAk )( void *p, AuswahlBox *, int, int ) ) // setzt die Event Funktion
  119. {
  120. this->eAk = eAk;
  121. }
  122. void AuswahlBox::setSchriftZ( Schrift *schrift ) // setzt die schrift
  123. {
  124. if( this->schrift )
  125. this->schrift->release();
  126. this->schrift = schrift;
  127. ausfahren->setSchriftZ( schrift->getThis() );
  128. rend = 1;
  129. }
  130. void AuswahlBox::addEintrag( const char *txt ) // Eintrag hinzufügen
  131. {
  132. TextFeld *tf = new TextFeld();
  133. if( schrift )
  134. tf->setSchriftZ( schrift->getThis() );
  135. tf->addStyle( TextFeld::Style::Sichtbar | TextFeld::Style::Center | TextFeld::Style::Rahmen );
  136. tf->setText( txt );
  137. tf->setSchriftFarbe( 0xFFFFFFFF );
  138. tf->setLinienRahmenFarbe( 0xFFFFFFFF );
  139. tf->setSize( 0, eintragHeight );
  140. members->add( tf, anzahl );
  141. ++anzahl;
  142. rend = 1;
  143. }
  144. void AuswahlBox::addEintrag( Text *txt )
  145. {
  146. TextFeld *tf = new TextFeld();
  147. if( schrift )
  148. tf->setSchriftZ( schrift->getThis() );
  149. tf->addStyle( TextFeld::Style::Sichtbar | TextFeld::Style::Center | TextFeld::Style::Rahmen );
  150. tf->setText( txt );
  151. tf->setSchriftFarbe( 0xFFFFFFFF );
  152. tf->setLinienRahmenFarbe( 0xFFFFFFFF );
  153. tf->setSize( 0, eintragHeight );
  154. members->add( tf, anzahl );
  155. ++anzahl;
  156. rend = 1;
  157. }
  158. void AuswahlBox::addEintragZ( TextFeld *txt )
  159. {
  160. members->add( txt, anzahl );
  161. ++anzahl;
  162. rend = 1;
  163. }
  164. void AuswahlBox::setEintrag( int i, const char *txt ) // Eintrag setzen
  165. {
  166. if( members->z( i ) )
  167. members->z( i )->setText( txt );
  168. rend = 1;
  169. }
  170. void AuswahlBox::setEintrag( int i, Text *txt )
  171. {
  172. if( members->z( i ) )
  173. members->z( i )->setText( txt );
  174. else
  175. txt->release();
  176. rend = 1;
  177. }
  178. void AuswahlBox::setEintragZ( int i, TextFeld *txt )
  179. {
  180. if( i < anzahl )
  181. members->set( txt, i );
  182. else
  183. txt->release();
  184. rend = 1;
  185. }
  186. void AuswahlBox::removeEintrag( int i ) // Eintrag entfernen
  187. {
  188. if( i < anzahl )
  189. {
  190. members->remove( i );
  191. if( msStyle )
  192. msStyle->remove( i );
  193. if( msAuswRahmen )
  194. msAuswRahmen->remove( i );
  195. if( msAuswBgF )
  196. msAuswBgF->remove( i );
  197. if( msAuswBgB )
  198. msAuswBgB->remove( i );
  199. if( msAuswAf )
  200. msAuswAf->remove( i );
  201. if( msMausRahmen )
  202. msMausRahmen->remove( i );
  203. if( msMausBgF )
  204. msMausBgF->remove( i );
  205. if( msMausBgB )
  206. msMausBgB->remove( i );
  207. if( msMausAf )
  208. msMausAf->remove( i );
  209. if( auswahl > i )
  210. --auswahl;
  211. if( mausEintrag > i )
  212. --mausEintrag;
  213. --anzahl;
  214. rend = 1;
  215. }
  216. }
  217. void AuswahlBox::setAusklappKnopfZ( Knopf *ausK ) // Ausklapp Knopf setzen
  218. {
  219. if( ausfahren )
  220. ausfahren->release();
  221. ausfahren = ausK;
  222. rend = 1;
  223. }
  224. void AuswahlBox::setEintragRahmenZ( int i, LRahmen *rahmen ) // Eintrag Rahmen setzen
  225. {
  226. if( members->z( i ) )
  227. members->z( i )->setLinienRahmenZ( rahmen );
  228. else
  229. rahmen->release();
  230. rend = 1;
  231. }
  232. void AuswahlBox::setEintragRahmenFarbe( int i, int f ) // Eintrag Rahmen Farbe setzen
  233. {
  234. if( members->z( i ) )
  235. members->z( i )->setLinienRahmenFarbe( f );
  236. rend = 1;
  237. }
  238. void AuswahlBox::setEintragRahmenBreite( int i, int rbr ) // Eintrag Rahmen Breite setzen
  239. {
  240. if( members->z( i ) )
  241. members->z( i )->setLinienRahmenBreite( rbr );
  242. rend = 1;
  243. }
  244. void AuswahlBox::setEintragHintergrundFarbe( int i, int f ) // Eintrag Hintergrund farbe setzen
  245. {
  246. if( members->z( i ) )
  247. members->z( i )->setHintergrundFarbe( f );
  248. rend = 1;
  249. }
  250. void AuswahlBox::setEintragHintergrundBildZ( int i, Bild *bgB ) // Eintrag Hintergrund Bild setzen
  251. {
  252. if( members->z( i ) )
  253. members->z( i )->setHintergrundBildZ( bgB );
  254. else
  255. bgB->release();
  256. rend = 1;
  257. }
  258. void AuswahlBox::setEintragHintergrundBild( int i, Bild *bgB )
  259. {
  260. if( members->z( i ) )
  261. members->z( i )->setHintergrundBild( bgB );
  262. else
  263. bgB->release();
  264. rend = 1;
  265. }
  266. void AuswahlBox::setEintragAlphaFeldZ( int i, AlphaFeld *af ) // Eintrag AlphaFeld setzen
  267. {
  268. if( members->z( i ) )
  269. members->z( i )->setAlphaFeldZ( af );
  270. rend = 1;
  271. }
  272. void AuswahlBox::setEintragAlphaFeldFarbe( int i, int afF ) // Eintrag AlphaFeld Farbe setzen
  273. {
  274. if( members->z( i ) )
  275. members->z( i )->setAlphaFeldFarbe( afF );
  276. rend = 1;
  277. }
  278. void AuswahlBox::setEintragAlphaFeldStrength( int i, int afSt ) // Eintrag AlphaFeld Stärke setzen
  279. {
  280. if( members->z( i ) )
  281. members->z( i )->setAlphaFeldStrength( afSt );
  282. rend = 1;
  283. }
  284. void AuswahlBox::setAuswRahmenZ( LRahmen *rahmen ) // Auswahl Rahmen setzen
  285. {
  286. if( auswRahmen )
  287. auswRahmen->release();
  288. auswRahmen = rahmen;
  289. rend = 1;
  290. }
  291. void AuswahlBox::setAuswRahmenFarbe( int f ) // Auswahl Rahmen Farbe setzen
  292. {
  293. if( !auswRahmen )
  294. auswRahmen = new LRahmen();
  295. auswRahmen->setFarbe( f );
  296. rend = 1;
  297. }
  298. void AuswahlBox::setAuswRahmenBreite( int rbr ) // Auswahl Rahmen Breite setzen
  299. {
  300. if( !auswRahmen )
  301. auswRahmen = new LRahmen();
  302. auswRahmen->setRamenBreite( rbr );
  303. rend = 1;
  304. }
  305. void AuswahlBox::setAuswHintergrundFarbe( int f ) // Auswahl Hintergrund Farbe setzen
  306. {
  307. auswBgF = f;
  308. rend = 1;
  309. }
  310. void AuswahlBox::setAuswHintergrundBildZ( Bild *bgB ) // Auswahl Hintergrund Bild setzen
  311. {
  312. if( auswBgB )
  313. auswBgB->release();
  314. auswBgB = bgB;
  315. rend = 1;
  316. }
  317. void AuswahlBox::setAuswHintergrundBild( Bild *bgB )
  318. {
  319. if( !auswBgB )
  320. auswBgB = new Bild();
  321. auswBgB->neuBild( bgB->getBreite(), bgB->getHeight(), 0 );
  322. auswBgB->drawBild( 0, 0, bgB->getBreite(), bgB->getHeight(), *bgB );
  323. bgB->release();
  324. rend = 1;
  325. }
  326. void AuswahlBox::setAuswAlphaFeldZ( AlphaFeld *af ) // Auswahl AlphaFeld setzen
  327. {
  328. if( auswAf )
  329. auswAf->release();
  330. auswAf = af;
  331. rend = 1;
  332. }
  333. void AuswahlBox::setAuswAlphaFeldFarbe( int afF ) // Auswahl AlphaFeld Farbe setzen
  334. {
  335. if( !auswAf )
  336. auswAf = new AlphaFeld();
  337. auswAf->setFarbe( afF );
  338. rend = 1;
  339. }
  340. void AuswahlBox::setAuswAlphaFeldStrength( int afSt ) // Auswahl Alpha Feld stärke setzen
  341. {
  342. if( !auswAf )
  343. auswAf = new AlphaFeld();
  344. auswAf->setStrength( afSt );
  345. rend = 1;
  346. }
  347. void AuswahlBox::setMsAuswRahmenZ( int i, LRahmen *rahmen ) // Multistyle Auswahl Rahmen setzen
  348. {
  349. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  350. {
  351. rahmen->release();
  352. return;
  353. }
  354. if( !msAuswRahmen )
  355. msAuswRahmen = new RCArray< LRahmen >();
  356. msAuswRahmen->set( rahmen, i );
  357. rend = 1;
  358. }
  359. void AuswahlBox::setMsAuswRahmenFarbe( int i, int f ) // Multistyle Auswahl Rahmen Farbe setzen
  360. {
  361. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  362. return;
  363. if( !msAuswRahmen )
  364. msAuswRahmen = new RCArray< LRahmen >();
  365. if( !msAuswRahmen->z( i ) )
  366. msAuswRahmen->set( new LRahmen(), i );
  367. msAuswRahmen->z( i )->setFarbe( f );
  368. rend = 1;
  369. }
  370. void AuswahlBox::setMsAuswRahmenBreite( int i, int rbr ) // Multistyle Auswahl Breite setzen
  371. {
  372. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  373. return;
  374. if( !msAuswRahmen )
  375. msAuswRahmen = new RCArray< LRahmen >();
  376. if( !msAuswRahmen->z( i ) )
  377. msAuswRahmen->set( new LRahmen(), i );
  378. msAuswRahmen->z( i )->setRamenBreite( rbr );
  379. rend = 1;
  380. }
  381. void AuswahlBox::setMsAuswHintergrundFarbe( int i, int f ) // Multistyle Auswahl Hintergrund Farbe setzen
  382. {
  383. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  384. return;
  385. if( !msAuswBgF )
  386. msAuswBgF = new Array< int >();
  387. msAuswBgF->set( f, i );
  388. rend = 1;
  389. }
  390. void AuswahlBox::setMsAuswHintergrundBildZ( int i, Bild *bgB ) // Multistyle Auswahl Hintergrund Bild setzen
  391. {
  392. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  393. {
  394. bgB->release();
  395. return;
  396. }
  397. if( !msAuswBgB )
  398. msAuswBgB = new RCArray< Bild >();
  399. msAuswBgB->set( bgB, i );
  400. rend = 1;
  401. }
  402. void AuswahlBox::setMsAuswHintergrundBild( int i, Bild *bgB )
  403. {
  404. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  405. {
  406. bgB->release();
  407. return;
  408. }
  409. if( !msAuswBgB )
  410. msAuswBgB = new RCArray< Bild >();
  411. if( !msAuswBgB->z( i ) )
  412. {
  413. Bild *z = new Bild;
  414. z->neuBild( bgB->getBreite(), bgB->getHeight(), 0 );
  415. z->drawBild( 0, 0, bgB->getBreite(), bgB->getHeight(), *bgB );
  416. msAuswBgB->set( z, i );
  417. }
  418. else
  419. {
  420. msAuswBgB->z( i )->neuBild( bgB->getBreite(), bgB->getHeight(), 0 );
  421. msAuswBgB->z( i )->drawBild( 0, 0, bgB->getBreite(), bgB->getHeight(), *bgB );
  422. }
  423. bgB->release();
  424. rend = 1;
  425. }
  426. void AuswahlBox::setMsAuswAlphaFeldZ( int i, AlphaFeld *af ) // Multistyle Auswahl AlphaFeld setzen
  427. {
  428. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  429. {
  430. af->release();
  431. return;
  432. }
  433. if( !msAuswAf )
  434. msAuswAf = new RCArray< AlphaFeld >();
  435. msAuswAf->set( af, i );
  436. rend = 1;
  437. }
  438. void AuswahlBox::setMsAuswAlphaFeldFarbe( int i, int afF ) // Multistyle Auswahl AlphaFeld Farbe setzen
  439. {
  440. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  441. return;
  442. if( !msAuswAf )
  443. msAuswAf = new RCArray< AlphaFeld >();
  444. if( !msAuswAf->z( i ) )
  445. msAuswAf->set( new AlphaFeld(), i );
  446. msAuswAf->z( i )->setFarbe( afF );
  447. rend = 1;
  448. }
  449. void AuswahlBox::setMsAuswAlphaFeldStrength( int i, int afSt ) // Multistyle Auswahl AlphaFeld stärke setzen
  450. {
  451. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  452. return;
  453. if( !msAuswAf )
  454. msAuswAf = new RCArray< AlphaFeld >();
  455. if( !msAuswAf->z( i ) )
  456. msAuswAf->set( new AlphaFeld(), i );
  457. msAuswAf->z( i )->setStrength( afSt );
  458. rend = 1;
  459. }
  460. void AuswahlBox::setMausRahmenZ( LRahmen *rahmen ) // Maus Rahmen setzen
  461. {
  462. if( mausRahmen )
  463. mausRahmen->release();
  464. mausRahmen = rahmen;
  465. rend = 1;
  466. }
  467. void AuswahlBox::setMausRahmenFarbe( int f ) // Maus Rahmen Farbe setzen
  468. {
  469. if( !mausRahmen )
  470. mausRahmen = new LRahmen();
  471. mausRahmen->setFarbe( f );
  472. rend = 1;
  473. }
  474. void AuswahlBox::setMausRahmenBreite( int rbr ) // Maus Rahmen breite setzen
  475. {
  476. if( !mausRahmen )
  477. mausRahmen = new LRahmen();
  478. mausRahmen->setRamenBreite( rbr );
  479. rend = 1;
  480. }
  481. void AuswahlBox::setMausHintergrundFarbe( int f ) // Maus Hintergrund Farbe setzen
  482. {
  483. mausBgF = f;
  484. rend = 1;
  485. }
  486. void AuswahlBox::setMausHintergrundBildZ( Bild *bgB ) // Maus Hintergrund Bild setzen
  487. {
  488. if( mausBgB )
  489. mausBgB->release();
  490. mausBgB = bgB;
  491. rend = 1;
  492. }
  493. void AuswahlBox::setMausHintergrundBild( Bild *bgB )
  494. {
  495. if( !mausBgB )
  496. mausBgB = new Bild();
  497. mausBgB->neuBild( bgB->getBreite(), bgB->getHeight(), 0 );
  498. mausBgB->drawBild( 0, 0, bgB->getBreite(), bgB->getHeight(), *bgB );
  499. bgB->release();
  500. rend = 1;
  501. }
  502. void AuswahlBox::setMausAlphaFeldZ( AlphaFeld *af ) // Maus AlphaFeld setzen
  503. {
  504. if( mausAf )
  505. mausAf->release();
  506. mausAf = af;
  507. rend = 1;
  508. }
  509. void AuswahlBox::setMausAlphaFeldFarbe( int afF ) // Maus AlphaFeld Farbe setzen
  510. {
  511. if( !mausAf )
  512. mausAf = new AlphaFeld();
  513. mausAf->setFarbe( afF );
  514. rend = 1;
  515. }
  516. void AuswahlBox::setMausAlphaFeldStrength( int afSt ) // Maus AlphaFeld stärke setzen
  517. {
  518. if( !mausAf )
  519. mausAf = new AlphaFeld();
  520. mausAf->setStrength( afSt );
  521. rend = 1;
  522. }
  523. void AuswahlBox::setMsMausRahmenZ( int i, LRahmen *rahmen ) // Multistyle Maus Rahmen setzen
  524. {
  525. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  526. {
  527. rahmen->release();
  528. return;
  529. }
  530. if( !msMausRahmen )
  531. msMausRahmen = new RCArray< LRahmen >();
  532. msMausRahmen->set( rahmen, i );
  533. rend = 1;
  534. }
  535. void AuswahlBox::setMsMausRahmenFarbe( int i, int f ) // Multistyle Maus Rahmen Farbe setzen
  536. {
  537. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  538. return;
  539. if( !msMausRahmen )
  540. msMausRahmen = new RCArray< LRahmen >();
  541. if( !msMausRahmen->z( i ) )
  542. msMausRahmen->set( new LRahmen(), i );
  543. msMausRahmen->z( i )->setFarbe( f );
  544. rend = 1;
  545. }
  546. void AuswahlBox::setMsMausRahmenBreite( int i, int rbr ) // Multistyle Maus Rahmen breite setzen
  547. {
  548. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  549. return;
  550. if( !msMausRahmen )
  551. msMausRahmen = new RCArray< LRahmen >();
  552. if( !msMausRahmen->z( i ) )
  553. msMausRahmen->set( new LRahmen(), i );
  554. msMausRahmen->z( i )->setRamenBreite( rbr );
  555. rend = 1;
  556. }
  557. void AuswahlBox::setMsMausHintergrundFarbe( int i, int f ) // Multistyle Maus Hintergrund Farbe setzen
  558. {
  559. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  560. return;
  561. if( !msMausBgF )
  562. msMausBgF = new Array< int >();
  563. msMausBgF->set( f, i );
  564. rend = 1;
  565. }
  566. void AuswahlBox::setMsMausHintergrundBildZ( int i, Bild *bgB ) // Multistyle Maus Hintergrund Bild setzen
  567. {
  568. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  569. {
  570. bgB->release();
  571. return;
  572. }
  573. if( !msMausBgB )
  574. msMausBgB = new RCArray< Bild >();
  575. msMausBgB->set( bgB, i );
  576. rend = 1;
  577. }
  578. void AuswahlBox::setMsMausHintergrundBild( int i, Bild *bgB )
  579. {
  580. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  581. {
  582. bgB->release();
  583. return;
  584. }
  585. if( !msMausBgB )
  586. msMausBgB = new RCArray< Bild >();
  587. if( !msMausBgB->z( i ) )
  588. {
  589. Bild *z = new Bild;
  590. z->neuBild( bgB->getBreite(), bgB->getHeight(), 0 );
  591. z->drawBild( 0, 0, bgB->getBreite(), bgB->getHeight(), *bgB );
  592. msMausBgB->set( z, i );
  593. }
  594. else
  595. {
  596. msMausBgB->z( i )->neuBild( bgB->getBreite(), bgB->getHeight(), 0 );
  597. msMausBgB->z( i )->drawBild( 0, 0, bgB->getBreite(), bgB->getHeight(), *bgB );
  598. }
  599. bgB->release();
  600. rend = 1;
  601. }
  602. void AuswahlBox::setMsMausAlphaFeldZ( int i, AlphaFeld *af ) // Multistyle Maus AlphaFeld setzen
  603. {
  604. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  605. {
  606. af->release();
  607. return;
  608. }
  609. if( !msMausAf )
  610. msMausAf = new RCArray< AlphaFeld >();
  611. msMausAf->set( af, i );
  612. rend = 1;
  613. }
  614. void AuswahlBox::setMsMausAlphaFeldFarbe( int i, int afF ) // Multistyle Maus AlphaFeld Farbe setzen
  615. {
  616. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  617. return;
  618. if( !msMausAf )
  619. msMausAf = new RCArray< AlphaFeld >();
  620. if( !msMausAf->z( i ) )
  621. msMausAf->set( new AlphaFeld(), i );
  622. msMausAf->z( i )->setFarbe( afF );
  623. rend = 1;
  624. }
  625. void AuswahlBox::setMsMausAlphaFeldStrength( int i, int afSt ) // Multistyle Maus AlphaFeld stärke setzen
  626. {
  627. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  628. return;
  629. if( !msMausAf )
  630. msMausAf = new RCArray< AlphaFeld >();
  631. if( !msMausAf->z( i ) )
  632. msMausAf->set( new AlphaFeld(), i );
  633. msMausAf->z( i )->setStrength( afSt );
  634. rend = 1;
  635. }
  636. void AuswahlBox::setAuswahl( int i ) // Eintrag auswählen
  637. {
  638. if( i < anzahl )
  639. {
  640. auswahl = i;
  641. if( eAk )
  642. eAk( eAkP, this, 0, auswahl );
  643. rend = 1;
  644. }
  645. }
  646. void AuswahlBox::ausklappen() // liste ausklappen
  647. {
  648. ausgeklappt = 1;
  649. }
  650. void AuswahlBox::einklappen() // liste einklappen
  651. {
  652. ausgeklappt = 0;
  653. }
  654. void AuswahlBox::scrollZuEintrag( int i ) // liste scrollen
  655. {
  656. if( hatStyle( Style::VScroll ) && vertikalScrollBar && i < anzahl )
  657. {
  658. int scrollPos = 0;
  659. if( hatStyle( Style::MultiStyled ) )
  660. {
  661. for( int j = 0; j < i; ++j )
  662. scrollPos += members->z( j ) ? members->z( j )->getHeight() : 0;
  663. }
  664. else
  665. scrollPos += i * eintragHeight;
  666. vertikalScrollBar->scroll( scrollPos );
  667. rend = 1;
  668. }
  669. }
  670. void AuswahlBox::setMaxAuskappHeight( int maxHeight ) // höhe der Liste beim ausklappen
  671. {
  672. ausklapMaxHeight = maxHeight;
  673. }
  674. void AuswahlBox::setEintragHeight( int height ) // setzt die Höhe der Einträge
  675. {
  676. eintragHeight = height;
  677. }
  678. void AuswahlBox::addMsStyle( int i, __int64 abStyle ) // Multistyle style hinzufügen
  679. {
  680. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  681. return;
  682. if( !msStyle )
  683. msStyle = new Array< __int64 >();
  684. msStyle->set( msStyle->get( i ) | abStyle, i );
  685. rend = 1;
  686. }
  687. void AuswahlBox::setMsStyle( int i, __int64 abStyle, bool add ) // Multistyle style setzen
  688. {
  689. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  690. return;
  691. if( !msStyle )
  692. msStyle = new Array< __int64 >();
  693. if( add )
  694. msStyle->set( msStyle->get( i ) | abStyle, i );
  695. else
  696. msStyle->set( msStyle->get( i ) & ~abStyle, i );
  697. rend = 1;
  698. }
  699. void AuswahlBox::setMsStyle( int i, __int64 abStyle )
  700. {
  701. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  702. return;
  703. if( !msStyle )
  704. msStyle = new Array< __int64 >();
  705. msStyle->set( abStyle, i );
  706. rend = 1;
  707. }
  708. void AuswahlBox::removeMsStyle( int i, __int64 abStyle ) // Multistyle style entfernen
  709. {
  710. if( hatStyleNicht( Style::MultiStyled ) || i >= anzahl )
  711. return;
  712. if( !msStyle )
  713. msStyle = new Array< __int64 >();
  714. msStyle->set( msStyle->get( i ) & ~abStyle, i );
  715. rend = 1;
  716. }
  717. bool AuswahlBox::tick( double tickVal ) // tick
  718. {
  719. if( ausgeklappt && ausfahren && !ausfahren->zText()->istGleich( "/\\" ) )
  720. {
  721. ausfahren->setText( "/\\" );
  722. rend = 1;
  723. }
  724. else if( !ausgeklappt && ausfahren && !ausfahren->zText()->istGleich( "\\/" ) )
  725. {
  726. ausfahren->setText( "\\/" );
  727. rend = 1;
  728. }
  729. if( hatStyleNicht( Style::Sichtbar ) || hatStyleNicht( Style::Erlaubt ) )
  730. ausgeklappt = 0;
  731. rend |= ausfahren->tick( tickVal );
  732. this->tickval += tickVal * 300;
  733. int val = ( int )this->tickval;
  734. if( val < 1 )
  735. return ZeichnungHintergrund::tick( tickVal );
  736. this->tickval -= val;
  737. int maxHeight = rahmen ? rahmen->getRBreite() : 0;
  738. if( hatStyleNicht( Style::MultiStyled ) )
  739. maxHeight += anzahl * eintragHeight;
  740. else
  741. for( int i = 0; i < anzahl; ++i )
  742. maxHeight += members->z( i ) ? members->z( i )->getHeight() : 0;
  743. if( maxHeight > ausklapMaxHeight )
  744. {
  745. if( hatStyle( Style::VScroll ) && vertikalScrollBar )
  746. {
  747. scrollAnzeigen = 1;
  748. vertikalScrollBar->update( maxHeight, ausklapMaxHeight );
  749. }
  750. maxHeight = ausklapMaxHeight;
  751. }
  752. else
  753. scrollAnzeigen = 0;
  754. if( ausgeklappt )
  755. {
  756. if( ausklappHeight < maxHeight )
  757. {
  758. ausklappHeight += val;
  759. if( ausklappHeight > maxHeight )
  760. ausklappHeight = maxHeight;
  761. rend = 1;
  762. }
  763. }
  764. else
  765. {
  766. if( ausklappHeight > 0 )
  767. {
  768. ausklappHeight -= val;
  769. if( ausklappHeight < 0 )
  770. ausklappHeight = 0;
  771. rend = 1;
  772. }
  773. }
  774. for( int i = 0; i < anzahl; ++i )
  775. {
  776. if( i != auswahl )
  777. rend |= members->z( i )->tick( tickVal );
  778. else
  779. members->z( i )->tick( tickVal );
  780. }
  781. return ZeichnungHintergrund::tick( tickVal );
  782. }
  783. void AuswahlBox::doMausEreignis( MausEreignis &me ) // Maus
  784. {
  785. mausEintrag = -1;
  786. if( hatStyleNicht( Style::Sichtbar ) || hatStyleNicht( Style::Erlaubt ) )
  787. {
  788. if( toolTip )
  789. toolTip->setMausIn( 0 );
  790. ausgeklappt = 0;
  791. return;
  792. }
  793. bool removeFokus = 0;
  794. bool nmakc = me.verarbeitet == 0;
  795. if( me.verarbeitet || !( me.mx >= pos.x && me.mx <= pos.x + gr.x && me.my >= pos.y && me.my <= pos.y + gr.y + ausklappHeight ) )
  796. {
  797. if( mausIn )
  798. {
  799. if( toolTip )
  800. toolTip->setMausIn( 0 );
  801. mausIn = 0;
  802. MausEreignis me2;
  803. me2.id = ME_Leaves;
  804. me2.mx = me.mx;
  805. me2.my = me.my;
  806. me2.verarbeitet = 0;
  807. doMausEreignis( me2 );
  808. return;
  809. }
  810. removeFokus = 1;
  811. }
  812. if( !( me.mx >= pos.x && me.mx <= pos.x + gr.x && me.my >= pos.y && me.my <= pos.y + gr.y + ausklappHeight ) && me.id != ME_Leaves )
  813. {
  814. if( removeFokus && me.id == ME_RLinks )
  815. {
  816. if( Mak && ( me.verarbeitet || Mak( makParam, this, me ) ) )
  817. removeStyle( Style::Fokus );
  818. ausgeklappt = 0;
  819. me.mx -= pos.x, me.my -= pos.y;
  820. if( nmakc && me.verarbeitet && nMak )
  821. me.verarbeitet = nMak( nmakParam, this, me );
  822. me.mx += pos.x, me.my += pos.y;
  823. }
  824. if( toolTip )
  825. toolTip->setMausIn( 0 );
  826. return;
  827. }
  828. if( !mausIn && me.id != ME_Leaves )
  829. {
  830. mausIn = 1;
  831. if( toolTip )
  832. toolTip->setMausIn( 1 );
  833. MausEreignis me2;
  834. me2.id = ME_Betritt;
  835. me2.mx = me.mx;
  836. me2.my = me.my;
  837. me2.verarbeitet = 0;
  838. doMausEreignis( me2 );
  839. }
  840. me.mx -= pos.x, me.my -= pos.y;
  841. if( Mak && ( me.verarbeitet || Mak( makParam, this, me ) ) )
  842. {
  843. bool vera = me.verarbeitet;
  844. if( ausfahren )
  845. {
  846. int tmpMx = me.mx;
  847. int tmpMy = me.my;
  848. if( me.mx > 0 && me.my > 0 && me.mx < gr.x && me.my < gr.y )
  849. me.mx = ausfahren->getX() + 1, me.my = ausfahren->getY() + 1;
  850. else
  851. me.mx = ausfahren->getX() - 1, me.my = ausfahren->getY() - 1;
  852. ausfahren->doMausEreignis( me );
  853. me.mx = tmpMx, me.my = tmpMy;
  854. }
  855. if( me.verarbeitet && !vera && me.id == ME_RLinks )
  856. {
  857. ausgeklappt = !ausgeklappt;
  858. if( ausgeklappt )
  859. mausEintrag = auswahl;
  860. if( scrollAnzeigen )
  861. scrollZuEintrag( mausEintrag );
  862. }
  863. if( removeFokus && me.id == ME_RLinks )
  864. removeStyle( Style::Fokus );
  865. if( !me.verarbeitet && hatStyleNicht( Style::Fokus ) && me.id == ME_RLinks )
  866. addStyle( Style::Fokus );
  867. if( hatStyle( Style::VScroll ) && vertikalScrollBar && ausgeklappt && scrollAnzeigen )
  868. {
  869. int rbr = 0;
  870. if( rahmen && hatStyle( Style::Rahmen ) )
  871. rbr = rahmen->getRBreite();
  872. if( ( ( me.mx > gr.x - 15 - rbr && me.my > gr.y ) || me.id == ME_UScroll || me.id == ME_DScroll ) && me.id != ME_Betritt && me.id != ME_Leaves )
  873. {
  874. vertikalScrollBar->doMausMessage( gr.x - rbr - 15, gr.y, 15, vertikalScrollBar->getScrollData()->anzeige, me );
  875. me.verarbeitet = 1;
  876. }
  877. }
  878. if( !me.verarbeitet )
  879. {
  880. int eintr = -1;
  881. int tmp = me.my - gr.y + ( vertikalScrollBar ? vertikalScrollBar->getScroll() : 0 );
  882. if( hatStyle( Style::MultiStyled ) )
  883. {
  884. for( int i = 0; i < anzahl; ++i )
  885. {
  886. if( tmp > 0 && tmp < ( members->z( i ) ? members->z( i )->getHeight() : 0 ) )
  887. {
  888. eintr = i;
  889. break;
  890. }
  891. tmp -= members->z( i ) ? members->z( i )->getHeight() : 0;
  892. }
  893. }
  894. else
  895. {
  896. for( int i = 0; i < anzahl; ++i )
  897. {
  898. if( tmp > 0 && tmp < eintragHeight )
  899. {
  900. eintr = i;
  901. break;
  902. }
  903. tmp -= eintragHeight;
  904. }
  905. }
  906. if( ausgeklappt && me.mx > 0 && me.mx < gr.x && me.my > gr.y && me.my < gr.y + ausklappHeight )
  907. {
  908. if( eintr >= 0 )
  909. {
  910. if( me.id == ME_RLinks )
  911. {
  912. if( auswahl != eintr )
  913. rend = 1;
  914. auswahl = eintr;
  915. if( eAk )
  916. eAk( eAkP, this, 0, auswahl );
  917. }
  918. if( mausEintrag != eintr )
  919. rend = 1;
  920. mausEintrag = eintr;
  921. }
  922. }
  923. }
  924. me.verarbeitet = 1;
  925. }
  926. if( nmakc && me.verarbeitet && nMak )
  927. me.verarbeitet = nMak( nmakParam, this, me );
  928. me.mx += pos.x, me.my += pos.y;
  929. }
  930. void AuswahlBox::doTastaturEreignis( TastaturEreignis &te ) // Tastatur
  931. {
  932. if( te.verarbeitet || hatStyleNicht( Style::Fokus ) || hatStyleNicht( Style::Erlaubt ) )
  933. return;
  934. if( te.id == TE_Release )
  935. {
  936. switch( te.taste )
  937. {
  938. case T_Oben:
  939. if( auswahl > 0 )
  940. --auswahl;
  941. else
  942. auswahl = anzahl - 1;
  943. if( eAk )
  944. eAk( eAkP, this, 0, auswahl );
  945. scrollZuEintrag( auswahl );
  946. rend = 1;
  947. break;
  948. case T_Unten:
  949. if( auswahl < anzahl - 1 )
  950. ++auswahl;
  951. else
  952. auswahl = 0;
  953. if( eAk )
  954. eAk( eAkP, this, 0, auswahl );
  955. scrollZuEintrag( auswahl );
  956. rend = 1;
  957. break;
  958. }
  959. }
  960. if( te.verarbeitet && nTak )
  961. te.verarbeitet = nTak( ntakParam, this, te );
  962. }
  963. void AuswahlBox::render( Bild &zRObj ) // zeichnet nach zRObj
  964. {
  965. if( hatStyle( Style::Sichtbar ) )
  966. {
  967. lockZeichnung();
  968. int br = gr.x;
  969. int hi = gr.y + ausklappHeight;
  970. if( ( ausklappHeight && !zRObj.setDrawOptionsErzwingen( pos.x, pos.y, br, hi ) ) || ( !ausklappHeight && !zRObj.setDrawOptions( pos.x, pos.y, br, hi ) ) )
  971. {
  972. unlockZeichnung();
  973. return;
  974. }
  975. int rbr = 0;
  976. if( hatStyle( Style::Rahmen ) && rahmen ) // Rahmen zeichnen
  977. {
  978. rahmen->setSize( br, hi );
  979. rahmen->render( zRObj );
  980. rbr = rahmen->getRBreite();
  981. }
  982. if( ( ausklappHeight && !zRObj.setDrawOptionsErzwingen( rbr, rbr, br - rbr * 2, hi - rbr * 2 ) ) || ( !ausklappHeight && !zRObj.setDrawOptions( rbr, rbr, br - rbr * 2, hi - rbr * 2 ) ) )
  983. {
  984. zRObj.releaseDrawOptions();
  985. unlockZeichnung();
  986. return;
  987. }
  988. if( hatStyle( Style::Hintergrund ) )
  989. {
  990. if( hatStyle( Style::HAlpha ) )
  991. zRObj.alphaRegion( 0, 0, br, hi, hintergrundFarbe );
  992. else
  993. zRObj.fillRegion( 0, 0, br, hi, hintergrundFarbe );
  994. if( hatStyle( Style::HBild ) && hintergrundBild )
  995. {
  996. if( hatStyle( Style::HAlpha ) )
  997. zRObj.alphaBild( 0, 0, br, hi, *hintergrundBild );
  998. else
  999. zRObj.drawBild( 0, 0, br, hi, *hintergrundBild );
  1000. }
  1001. }
  1002. if( hatStyle( Style::Buffered ) && hintergrundFeld )
  1003. {
  1004. hintergrundFeld->setSize( br - rbr * 2, hi - rbr * 2 );
  1005. hintergrundFeld->render( zRObj );
  1006. }
  1007. if( ausfahren ) // Ausklapp Knopf zeichnen
  1008. {
  1009. ausfahren->setSize( gr.y - rbr * 2, gr.y - rbr * 2 );
  1010. ausfahren->setPosition( gr.x - rbr - ausfahren->getBreite(), rbr );
  1011. ausfahren->render( zRObj );
  1012. }
  1013. if( members ) // Ausgewähtes TextFeld zeichnen
  1014. {
  1015. if( auswahl < 0 )
  1016. {
  1017. auswahl = 0;
  1018. if( eAk )
  1019. eAk( eAkP, this, 0, auswahl );
  1020. }
  1021. if( auswahl >= anzahl )
  1022. {
  1023. auswahl = anzahl - 1;
  1024. if( eAk )
  1025. eAk( eAkP, this, 0, auswahl );
  1026. }
  1027. TextFeld *tf = auswahl >= 0 ? members->z( auswahl ) : 0;
  1028. if( tf )
  1029. {
  1030. AlphaFeld *tmpBuffer = 0;
  1031. bool tmpB = 0;
  1032. int tmpHFarbe = 0;
  1033. bool tmpH = 0;
  1034. Bild *tmpHBild = 0;
  1035. bool tmpHB = 0;
  1036. bool tmpHAlpha = 0;
  1037. LRahmen *tmpRahmen = 0;
  1038. bool tmpR = 0;
  1039. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1040. {
  1041. if( hatStyle( Style::AuswahlBuffer ) )
  1042. {
  1043. tmpBuffer = tf->getAlphaFeld();
  1044. tf->setAlphaFeldZ( auswAf->getThis() );
  1045. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1046. tf->setStyle( TextFeld::Style::Buffered, hatStyle( Style::AuswahlBuffer ) );
  1047. }
  1048. if( hatStyle( Style::AuswahlHintergrund ) )
  1049. {
  1050. tmpH = tf->hatStyle( TextFeld::Style::Hintergrund );
  1051. tmpHFarbe = tf->getHintergrundFarbe();
  1052. tf->setHintergrundFarbe( auswBgF );
  1053. tf->setStyle( TextFeld::Style::Hintergrund, hatStyle( Style::Hintergrund ) );
  1054. if( hatStyle( Style::AuswahlHBild ) )
  1055. {
  1056. tmpHBild = tf->getHintergrundBild();
  1057. tf->setHintergrundBildZ( auswBgB->getThis() );
  1058. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1059. tf->setStyle( TextFeld::Style::HBild, hatStyle( Style::HBild ) );
  1060. }
  1061. if( hatStyle( Style::AuswahlHAlpha ) )
  1062. {
  1063. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1064. tf->setStyle( TextFeld::Style::HAlpha, hatStyle( Style::AuswahlHAlpha ) );
  1065. }
  1066. }
  1067. if( hatStyle( Style::AuswahlRahmen ) )
  1068. {
  1069. tmpRahmen = tf->getLinienRahmen();
  1070. tf->setLinienRahmenZ( auswRahmen->getThis() );
  1071. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1072. tf->setStyle( TextFeld::Style::Rahmen, hatStyle( Style::AuswahlRahmen ) );
  1073. }
  1074. }
  1075. else
  1076. {
  1077. if( hatMsStyle( auswahl, Style::AuswahlBuffer ) && msAuswAf )
  1078. {
  1079. tmpBuffer = tf->getAlphaFeld();
  1080. tf->setAlphaFeldZ( msAuswAf->get( auswahl ) );
  1081. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1082. tf->setStyle( TextFeld::Style::Buffered, hatMsStyle( auswahl, Style::AuswahlBuffer ) );
  1083. }
  1084. if( hatMsStyle( auswahl, Style::AuswahlHintergrund ) )
  1085. {
  1086. tmpH = tf->hatStyle( Style::Hintergrund );
  1087. tf->setStyle( TextFeld::Style::Hintergrund, hatMsStyle( auswahl, Style::AuswahlHintergrund ) );
  1088. if( msAuswBgF && msAuswBgF->hat( auswahl ) )
  1089. {
  1090. tmpHFarbe = tf->getHintergrundFarbe();
  1091. tf->setHintergrundFarbe( msAuswBgF->get( auswahl ) );
  1092. }
  1093. if( hatMsStyle( auswahl, Style::AuswahlHBild ) && msAuswBgB )
  1094. {
  1095. tmpHBild = tf->getHintergrundBild();
  1096. tf->setHintergrundBildZ( msAuswBgB->get( auswahl ) );
  1097. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1098. tf->setStyle( TextFeld::Style::HBild, hatMsStyle( auswahl, Style::HBild ) );
  1099. }
  1100. if( hatMsStyle( auswahl, Style::AuswahlHAlpha ) )
  1101. {
  1102. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1103. tf->setStyle( TextFeld::Style::HAlpha, hatMsStyle( auswahl, Style::AuswahlHAlpha ) );
  1104. }
  1105. }
  1106. if( hatMsStyle( auswahl, Style::AuswahlRahmen ) && msAuswRahmen )
  1107. {
  1108. tmpRahmen = tf->getLinienRahmen();
  1109. tf->setLinienRahmenZ( msAuswRahmen->get( auswahl ) );
  1110. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1111. tf->setStyle( TextFeld::Style::Rahmen, hatMsStyle( auswahl, Style::AuswahlRahmen ) );
  1112. }
  1113. }
  1114. int tmpHi = tf->getHeight();
  1115. tf->setPosition( 0, 0 );
  1116. tf->setSize( gr.x - rbr * 2 - ( ausfahren ? ausfahren->getBreite() : 0 ), gr.y - rbr * 2 );
  1117. tf->render( zRObj );
  1118. tf->setSize( tf->getBreite(), tmpHi );
  1119. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1120. {
  1121. if( hatStyle( Style::AuswahlBuffer ) )
  1122. {
  1123. tf->setAlphaFeldZ( tmpBuffer );
  1124. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1125. }
  1126. if( hatStyle( Style::AuswahlHintergrund ) )
  1127. {
  1128. tf->setHintergrundFarbe( tmpHFarbe );
  1129. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1130. if( hatStyle( Style::AuswahlHBild ) )
  1131. {
  1132. tf->setHintergrundBildZ( tmpHBild );
  1133. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1134. }
  1135. if( hatStyle( Style::AuswahlHAlpha ) )
  1136. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1137. }
  1138. if( hatStyle( Style::AuswahlRahmen ) )
  1139. {
  1140. tf->setLinienRahmenZ( tmpRahmen );
  1141. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1142. }
  1143. }
  1144. else
  1145. {
  1146. if( hatMsStyle( auswahl, Style::AuswahlBuffer ) && msAuswAf )
  1147. {
  1148. tf->setAlphaFeldZ( tmpBuffer );
  1149. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1150. }
  1151. if( hatMsStyle( auswahl, Style::AuswahlHintergrund ) )
  1152. {
  1153. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1154. if( msAuswBgF && msAuswBgF->hat( auswahl ) )
  1155. tf->setHintergrundFarbe( tmpHFarbe );
  1156. if( hatMsStyle( auswahl, Style::AuswahlHBild ) && msAuswBgB )
  1157. {
  1158. tf->setHintergrundBildZ( tmpHBild );
  1159. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1160. }
  1161. if( hatMsStyle( auswahl, Style::AuswahlHAlpha ) )
  1162. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1163. }
  1164. if( hatMsStyle( auswahl, Style::AuswahlRahmen ) && msAuswRahmen )
  1165. {
  1166. tf->setLinienRahmenZ( tmpRahmen );
  1167. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1168. }
  1169. }
  1170. }
  1171. }
  1172. bool vsb = hatStyle( Style::VScroll ) && vertikalScrollBar; // Scroll bar zeichnen
  1173. if( auswahl >= anzahl )
  1174. {
  1175. auswahl = 0;
  1176. if( eAk )
  1177. eAk( eAkP, this, 0, auswahl );
  1178. }
  1179. if( members )
  1180. {
  1181. if( vsb && ausklappHeight )
  1182. {
  1183. br -= 15;
  1184. vertikalScrollBar->getScrollData()->anzeige = ausklappHeight - rbr;
  1185. vertikalScrollBar->render( br - rbr, gr.y, 15, ausklappHeight - rbr, zRObj );
  1186. }
  1187. if( ( ausklappHeight && !zRObj.setDrawOptionsErzwingen( 0, gr.y, br - rbr, hi - rbr - gr.y ) ) || ( !ausklappHeight && !zRObj.setDrawOptions( 0, gr.y, br - rbr, hi - rbr - gr.y ) ) )
  1188. {
  1189. zRObj.releaseDrawOptions();
  1190. zRObj.releaseDrawOptions();
  1191. unlockZeichnung();
  1192. return;
  1193. }
  1194. int maxHeight = 0;
  1195. int dy = 0;
  1196. if( vsb )
  1197. dy -= vertikalScrollBar->getScroll();
  1198. int mdy = hi - rbr;
  1199. anzahl = members->getEintragAnzahl();
  1200. for( int i = 0; i < anzahl; ++i )
  1201. {
  1202. TextFeld *tf = members->z( i );
  1203. if( dy >= mdy && !vsb )
  1204. break;
  1205. tf->setPosition( 0, dy );
  1206. tf->setSize( br - rbr * 2, tf->getHeight() );
  1207. maxHeight += tf->getHeight();
  1208. bool selected = auswahl == i;
  1209. AlphaFeld *tmpBuffer = 0;
  1210. bool tmpB = 0;
  1211. int tmpHFarbe = 0;
  1212. bool tmpH = 0;
  1213. Bild *tmpHBild = 0;
  1214. bool tmpHB = 0;
  1215. bool tmpHAlpha = 0;
  1216. LRahmen *tmpRahmen = 0;
  1217. bool tmpR = 0;
  1218. if( selected )
  1219. {
  1220. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1221. {
  1222. if( hatStyle( Style::AuswahlBuffer ) )
  1223. {
  1224. tmpBuffer = tf->getAlphaFeld();
  1225. tf->setAlphaFeldZ( auswAf->getThis() );
  1226. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1227. tf->setStyle( TextFeld::Style::Buffered, hatStyle( Style::AuswahlBuffer ) );
  1228. }
  1229. if( hatStyle( Style::AuswahlHintergrund ) )
  1230. {
  1231. tmpH = tf->hatStyle( TextFeld::Style::Hintergrund );
  1232. tmpHFarbe = tf->getHintergrundFarbe();
  1233. tf->setHintergrundFarbe( auswBgF );
  1234. tf->setStyle( TextFeld::Style::Hintergrund, hatStyle( Style::Hintergrund ) );
  1235. if( hatStyle( Style::AuswahlHBild ) )
  1236. {
  1237. tmpHBild = tf->getHintergrundBild();
  1238. tf->setHintergrundBildZ( auswBgB->getThis() );
  1239. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1240. tf->setStyle( TextFeld::Style::HBild, hatStyle( Style::HBild ) );
  1241. }
  1242. if( hatStyle( Style::AuswahlHAlpha ) )
  1243. {
  1244. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1245. tf->setStyle( TextFeld::Style::HAlpha, hatStyle( Style::AuswahlHAlpha ) );
  1246. }
  1247. }
  1248. if( hatStyle( Style::AuswahlRahmen ) )
  1249. {
  1250. tmpRahmen = tf->getLinienRahmen();
  1251. tf->setLinienRahmenZ( auswRahmen->getThis() );
  1252. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1253. tf->setStyle( TextFeld::Style::Rahmen, hatStyle( Style::AuswahlRahmen ) );
  1254. }
  1255. }
  1256. else
  1257. {
  1258. if( hatMsStyle( i, Style::AuswahlBuffer ) && msAuswAf )
  1259. {
  1260. tmpBuffer = tf->getAlphaFeld();
  1261. tf->setAlphaFeldZ( msAuswAf->get( i ) );
  1262. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1263. tf->setStyle( TextFeld::Style::Buffered, hatMsStyle( i, Style::AuswahlBuffer ) );
  1264. }
  1265. if( hatMsStyle( i, Style::AuswahlHintergrund ) )
  1266. {
  1267. tmpH = tf->hatStyle( Style::Hintergrund );
  1268. tf->setStyle( TextFeld::Style::Hintergrund, hatMsStyle( i, Style::AuswahlHintergrund ) );
  1269. if( msAuswBgF && msAuswBgF->hat( i ) )
  1270. {
  1271. tmpHFarbe = tf->getHintergrundFarbe();
  1272. tf->setHintergrundFarbe( msAuswBgF->get( i ) );
  1273. }
  1274. if( hatMsStyle( i, Style::AuswahlHBild ) && msAuswBgB )
  1275. {
  1276. tmpHBild = tf->getHintergrundBild();
  1277. tf->setHintergrundBildZ( msAuswBgB->get( i ) );
  1278. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1279. tf->setStyle( TextFeld::Style::HBild, hatMsStyle( i, Style::HBild ) );
  1280. }
  1281. if( hatMsStyle( i, Style::AuswahlHAlpha ) )
  1282. {
  1283. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1284. tf->setStyle( TextFeld::Style::HAlpha, hatMsStyle( i, Style::AuswahlHAlpha ) );
  1285. }
  1286. }
  1287. if( hatMsStyle( i, Style::AuswahlRahmen ) && msAuswRahmen )
  1288. {
  1289. tmpRahmen = tf->getLinienRahmen();
  1290. tf->setLinienRahmenZ( msAuswRahmen->get( i ) );
  1291. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1292. tf->setStyle( TextFeld::Style::Rahmen, hatMsStyle( i, Style::AuswahlRahmen ) );
  1293. }
  1294. }
  1295. }
  1296. else if( mausEintrag == i )
  1297. {
  1298. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1299. {
  1300. if( hatStyle( Style::MausBuffer ) )
  1301. {
  1302. tmpBuffer = tf->getAlphaFeld();
  1303. tf->setAlphaFeldZ( mausAf->getThis() );
  1304. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1305. tf->setStyle( TextFeld::Style::Buffered, hatStyle( Style::MausBuffer ) );
  1306. }
  1307. if( hatStyle( Style::MausHintergrund ) )
  1308. {
  1309. tmpH = tf->hatStyle( TextFeld::Style::Hintergrund );
  1310. tmpHFarbe = tf->getHintergrundFarbe();
  1311. tf->setHintergrundFarbe( mausBgF );
  1312. tf->setStyle( TextFeld::Style::Hintergrund, hatStyle( Style::Hintergrund ) );
  1313. if( hatStyle( Style::MausHBild ) )
  1314. {
  1315. tmpHBild = tf->getHintergrundBild();
  1316. tf->setHintergrundBildZ( mausBgB->getThis() );
  1317. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1318. tf->setStyle( TextFeld::Style::HBild, hatStyle( Style::HBild ) );
  1319. }
  1320. if( hatStyle( Style::MausHAlpha ) )
  1321. {
  1322. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1323. tf->setStyle( TextFeld::Style::HAlpha, hatStyle( Style::MausHAlpha ) );
  1324. }
  1325. }
  1326. if( hatStyle( Style::MausRahmen ) )
  1327. {
  1328. tmpRahmen = tf->getLinienRahmen();
  1329. tf->setLinienRahmenZ( mausRahmen->getThis() );
  1330. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1331. tf->setStyle( TextFeld::Style::Rahmen, hatStyle( Style::MausRahmen ) );
  1332. }
  1333. }
  1334. else
  1335. {
  1336. if( hatMsStyle( i, Style::MausBuffer ) && msAuswAf )
  1337. {
  1338. tmpBuffer = tf->getAlphaFeld();
  1339. tf->setAlphaFeldZ( msMausAf->get( i ) );
  1340. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1341. tf->setStyle( TextFeld::Style::Buffered, hatMsStyle( i, Style::MausBuffer ) );
  1342. }
  1343. if( hatMsStyle( i, Style::MausHintergrund ) )
  1344. {
  1345. tmpH = tf->hatStyle( Style::Hintergrund );
  1346. tf->setStyle( TextFeld::Style::Hintergrund, hatMsStyle( i, Style::MausHintergrund ) );
  1347. if( msMausBgF && msMausBgF->hat( i ) )
  1348. {
  1349. tmpHFarbe = tf->getHintergrundFarbe();
  1350. tf->setHintergrundFarbe( msMausBgF->get( i ) );
  1351. }
  1352. if( hatMsStyle( i, Style::MausHBild ) && msMausBgB )
  1353. {
  1354. tmpHBild = tf->getHintergrundBild();
  1355. tf->setHintergrundBildZ( msMausBgB->get( i ) );
  1356. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1357. tf->setStyle( TextFeld::Style::HBild, hatMsStyle( i, Style::HBild ) );
  1358. }
  1359. if( hatMsStyle( i, Style::MausHAlpha ) )
  1360. {
  1361. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1362. tf->setStyle( TextFeld::Style::HAlpha, hatMsStyle( i, Style::MausHAlpha ) );
  1363. }
  1364. }
  1365. if( hatMsStyle( i, Style::MausRahmen ) && msMausRahmen )
  1366. {
  1367. tmpRahmen = tf->getLinienRahmen();
  1368. tf->setLinienRahmenZ( msMausRahmen->get( i ) );
  1369. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1370. tf->setStyle( TextFeld::Style::Rahmen, hatMsStyle( i, Style::MausRahmen ) );
  1371. }
  1372. }
  1373. }
  1374. tf->render( zRObj );
  1375. if( selected )
  1376. {
  1377. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1378. {
  1379. if( hatStyle( Style::AuswahlBuffer ) )
  1380. {
  1381. tf->setAlphaFeldZ( tmpBuffer );
  1382. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1383. }
  1384. if( hatStyle( Style::AuswahlHintergrund ) )
  1385. {
  1386. tf->setHintergrundFarbe( tmpHFarbe );
  1387. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1388. if( hatStyle( Style::AuswahlHBild ) )
  1389. {
  1390. tf->setHintergrundBildZ( tmpHBild );
  1391. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1392. }
  1393. if( hatStyle( Style::AuswahlHAlpha ) )
  1394. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1395. }
  1396. if( hatStyle( Style::AuswahlRahmen ) )
  1397. {
  1398. tf->setLinienRahmenZ( tmpRahmen );
  1399. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1400. }
  1401. }
  1402. else
  1403. {
  1404. if( hatMsStyle( i, Style::AuswahlBuffer ) && msAuswAf )
  1405. {
  1406. tf->setAlphaFeldZ( tmpBuffer );
  1407. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1408. }
  1409. if( hatMsStyle( i, Style::AuswahlHintergrund ) )
  1410. {
  1411. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1412. if( msAuswBgF && msAuswBgF->hat( i ) )
  1413. tf->setHintergrundFarbe( tmpHFarbe );
  1414. if( hatMsStyle( i, Style::AuswahlHBild ) && msAuswBgB )
  1415. {
  1416. tf->setHintergrundBildZ( tmpHBild );
  1417. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1418. }
  1419. if( hatMsStyle( i, Style::AuswahlHAlpha ) )
  1420. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1421. }
  1422. if( hatMsStyle( i, Style::AuswahlRahmen ) && msAuswRahmen )
  1423. {
  1424. tf->setLinienRahmenZ( tmpRahmen );
  1425. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1426. }
  1427. }
  1428. }
  1429. else if( mausEintrag == i )
  1430. {
  1431. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1432. {
  1433. if( hatStyle( Style::MausBuffer ) )
  1434. {
  1435. tf->setAlphaFeldZ( tmpBuffer );
  1436. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1437. }
  1438. if( hatStyle( Style::MausHintergrund ) )
  1439. {
  1440. tf->setHintergrundFarbe( tmpHFarbe );
  1441. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1442. if( hatStyle( Style::MausHBild ) )
  1443. {
  1444. tf->setHintergrundBildZ( tmpHBild );
  1445. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1446. }
  1447. if( hatStyle( Style::MausHAlpha ) )
  1448. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1449. }
  1450. if( hatStyle( Style::MausRahmen ) )
  1451. {
  1452. tf->setLinienRahmenZ( tmpRahmen );
  1453. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1454. }
  1455. }
  1456. else
  1457. {
  1458. if( hatMsStyle( i, Style::MausBuffer ) && msAuswAf )
  1459. {
  1460. tf->setAlphaFeldZ( tmpBuffer );
  1461. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1462. }
  1463. if( hatMsStyle( i, Style::MausHintergrund ) )
  1464. {
  1465. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1466. if( msAuswBgF && msAuswBgF->hat( i ) )
  1467. tf->setHintergrundFarbe( tmpHFarbe );
  1468. if( hatMsStyle( i, Style::MausHBild ) && msAuswBgB )
  1469. {
  1470. tf->setHintergrundBildZ( tmpHBild );
  1471. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1472. }
  1473. if( hatMsStyle( i, Style::MausHAlpha ) )
  1474. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1475. }
  1476. if( hatMsStyle( i, Style::MausRahmen ) && msAuswRahmen )
  1477. {
  1478. tf->setLinienRahmenZ( tmpRahmen );
  1479. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1480. }
  1481. }
  1482. }
  1483. dy += tf->getHeight();
  1484. }
  1485. if( vertikalScrollBar )
  1486. vertikalScrollBar->getScrollData()->max = maxHeight;
  1487. zRObj.releaseDrawOptions();
  1488. }
  1489. zRObj.releaseDrawOptions();
  1490. zRObj.releaseDrawOptions();
  1491. unlockZeichnung();
  1492. }
  1493. }
  1494. // constant
  1495. int AuswahlBox::getEintragPos( const char *txt ) const // gibt die Eintrag Position zurück
  1496. {
  1497. for( int i = 0; i < anzahl; ++i )
  1498. if( members->z( i ) && members->z( i )->zText()->istGleich( txt ) )
  1499. return i;
  1500. return -1;
  1501. }
  1502. int AuswahlBox::getEintragPos( Text *txt ) const
  1503. {
  1504. for( int i = 0; i < anzahl; ++i )
  1505. {
  1506. if( members->z( i ) && members->z( i )->zText()->istGleich( txt->getText() ) )
  1507. {
  1508. txt->release();
  1509. return i;
  1510. }
  1511. }
  1512. txt->release();
  1513. return -1;
  1514. }
  1515. Text *AuswahlBox::getEintragText( int i ) const // gibt den Eintrag Text zurück
  1516. {
  1517. if( i >= anzahl )
  1518. return 0;
  1519. return members->z( i ) ? members->z( i )->getText() : 0;
  1520. }
  1521. Text *AuswahlBox::zEintragText( int i ) const
  1522. {
  1523. if( i >= anzahl )
  1524. return 0;
  1525. return members->z( i ) ? members->z( i )->zText() : 0;
  1526. }
  1527. TextFeld *AuswahlBox::getEintrag( int i ) const // gibt den Eintrag zurück
  1528. {
  1529. if( i >= anzahl )
  1530. return 0;
  1531. return members->get( i );
  1532. }
  1533. TextFeld *AuswahlBox::zEintrag( int i ) const
  1534. {
  1535. if( i >= anzahl )
  1536. return 0;
  1537. return members->z( i );
  1538. }
  1539. int AuswahlBox::getAuswahl() const // gibt die Position des ausgewählten Eintrages zurück
  1540. {
  1541. return auswahl;
  1542. }
  1543. int AuswahlBox::getEintragAnzahl() const // gibt die Anzahl der Einträge zurück
  1544. {
  1545. return anzahl;
  1546. }
  1547. bool AuswahlBox::istAusgeklappt() const // prüft, ob die Liste ausgeklappt ist
  1548. {
  1549. return ausgeklappt;
  1550. }
  1551. int AuswahlBox::getMaxHeight() const // gibt die maximale Höhe der Liste zurück
  1552. {
  1553. if( !hatStyle( Style::MaxHeight ) )
  1554. return 0;
  1555. return ausklapMaxHeight;
  1556. }
  1557. int AuswahlBox::getEintragHeight() const // gibt die Höhe der Einträge zurück
  1558. {
  1559. return eintragHeight;
  1560. }
  1561. Knopf *AuswahlBox::getAusklappKnopf() const // gibt den aus-/einklapp Knopf zurück
  1562. {
  1563. if( hatStyle( Style::MultiStyled ) )
  1564. return 0;
  1565. return ausfahren ? ausfahren->getThis() : 0;
  1566. }
  1567. Knopf *AuswahlBox::zAusklappKnopf() const
  1568. {
  1569. if( hatStyle( Style::MultiStyled ) )
  1570. return 0;
  1571. return ausfahren;
  1572. }
  1573. LRahmen *AuswahlBox::getEintragRahmen( int i ) const // gibt den Eintrag Rahmen zurück
  1574. {
  1575. if( !hatStyle( Style::MultiStyled ) )
  1576. return 0;
  1577. if( !members->z( i ) )
  1578. return 0;
  1579. return members->z( i )->getLinienRahmen();
  1580. }
  1581. LRahmen *AuswahlBox::zEintragRahmen( int i ) const
  1582. {
  1583. if( !hatStyle( Style::MultiStyled ) )
  1584. return 0;
  1585. if( !members->z( i ) )
  1586. return 0;
  1587. return members->z( i )->zLinienRahmen();
  1588. }
  1589. int AuswahlBox::getEintragRahmenFarbe( int i ) const // gibt die Eintrag Rahmen Frabe zurück
  1590. {
  1591. if( !hatStyle( Style::MultiStyled ) )
  1592. return 0;
  1593. if( !members->z( i ) )
  1594. return 0;
  1595. return members->z( i )->getLinienRahmenFarbe();
  1596. }
  1597. int AuswahlBox::getEintragRahmenBreite( int i ) const // gibt die Eintrag Rahmen Breite zurück
  1598. {
  1599. if( !hatStyle( Style::MultiStyled ) )
  1600. return 0;
  1601. if( !members->z( i ) )
  1602. return 0;
  1603. return members->z( i )->getLinienRahmenBreite();
  1604. }
  1605. AlphaFeld *AuswahlBox::getEintragAlphaFeld( int i ) const // gibt das Eintrag AlphaFeld zurück
  1606. {
  1607. if( !hatStyle( Style::MultiStyled ) )
  1608. return 0;
  1609. if( !members->z( i ) )
  1610. return 0;
  1611. return members->z( i )->getAlphaFeld();
  1612. }
  1613. AlphaFeld *AuswahlBox::zEintragAlphaFeld( int i ) const
  1614. {
  1615. if( !hatStyle( Style::MultiStyled ) )
  1616. return 0;
  1617. if( !members->z( i ) )
  1618. return 0;
  1619. return members->z( i )->zAlphaFeld();
  1620. }
  1621. int AuswahlBox::getEintragAlphaFeldFarbe( int i ) const // gibt die Eintrag AlphaFeld Farbe zurück
  1622. {
  1623. if( !hatStyle( Style::MultiStyled ) )
  1624. return 0;
  1625. if( !members->z( i ) )
  1626. return 0;
  1627. return members->z( i )->getAlphaFeldFarbe();
  1628. }
  1629. int AuswahlBox::getEintragAlphaFeldStrength( int i ) const // gibt die Eintrag AlphaFeld stärke zurück
  1630. {
  1631. if( !hatStyle( Style::MultiStyled ) )
  1632. return 0;
  1633. if( !members->z( i ) )
  1634. return 0;
  1635. return members->z( i )->getAlphaFeldStrength();
  1636. }
  1637. int AuswahlBox::getEintragHintergrundFarbe( int i ) const // gibt die Eintrag Hintergrund Farbe zurück
  1638. {
  1639. if( !hatStyle( Style::MultiStyled ) )
  1640. return 0;
  1641. if( !members->z( i ) )
  1642. return 0;
  1643. return members->z( i )->getHintergrundFarbe();
  1644. }
  1645. Bild *AuswahlBox::getEintragHintergrundBild( int i ) const // gibt das Eintrag Hintergrund Bild zurück
  1646. {
  1647. if( !hatStyle( Style::MultiStyled ) )
  1648. return 0;
  1649. if( !members->z( i ) )
  1650. return 0;
  1651. return members->z( i )->getHintergrundBild();
  1652. }
  1653. Bild *AuswahlBox::zEintragHintergrundBild( int i ) const
  1654. {
  1655. if( !hatStyle( Style::MultiStyled ) )
  1656. return 0;
  1657. if( !members->z( i ) )
  1658. return 0;
  1659. return members->z( i )->zHintergrundBild();
  1660. }
  1661. LRahmen *AuswahlBox::getAuswRahmen() const // gibt den Auswahl Rahmen zurück
  1662. {
  1663. if( hatStyle( Style::MultiStyled ) )
  1664. return 0;
  1665. return auswRahmen ? auswRahmen->getThis() : 0;
  1666. }
  1667. LRahmen *AuswahlBox::zAuswRahmen() const
  1668. {
  1669. if( hatStyle( Style::MultiStyled ) )
  1670. return 0;
  1671. return auswRahmen;
  1672. }
  1673. int AuswahlBox::getAuswRahmenFarbe() const // gibt die Auswahl Rahmen Frabe zurück
  1674. {
  1675. if( hatStyle( Style::MultiStyled ) )
  1676. return 0;
  1677. return auswRahmen ? auswRahmen->getFarbe() : 0;
  1678. }
  1679. int AuswahlBox::getAuswRahmenBreite() const // gibt die Auswahl Rahmen Breite zurück
  1680. {
  1681. if( hatStyle( Style::MultiStyled ) )
  1682. return 0;
  1683. return auswRahmen ? auswRahmen->getRBreite() : 0;
  1684. }
  1685. AlphaFeld *AuswahlBox::getAuswAlphaFeld() const // gibt das Auswahl AlphaFeld zurück
  1686. {
  1687. if( hatStyle( Style::MultiStyled ) )
  1688. return 0;
  1689. return auswAf ? auswAf->getThis() : 0;
  1690. }
  1691. AlphaFeld *AuswahlBox::zAuswAlphaFeld() const
  1692. {
  1693. if( hatStyle( Style::MultiStyled ) )
  1694. return 0;
  1695. return auswAf;
  1696. }
  1697. int AuswahlBox::getAuswAlphaFeldFarbe() const // gibt die Auswahl AlphaFeld Farbe zurück
  1698. {
  1699. if( hatStyle( Style::MultiStyled ) )
  1700. return 0;
  1701. return auswAf ? auswAf->getFarbe() : 0;
  1702. }
  1703. int AuswahlBox::getAuswAlphaFeldStrength() const // gibt die Auswahl AlphaFeld stärke zurück
  1704. {
  1705. if( hatStyle( Style::MultiStyled ) )
  1706. return 0;
  1707. return auswAf ? auswAf->getStrength() : 0;
  1708. }
  1709. int AuswahlBox::getAuswHintergrundFarbe() const // gibt die Auswahl Hintergrund Farbe zurück
  1710. {
  1711. if( hatStyle( Style::MultiStyled ) )
  1712. return 0;
  1713. return auswBgF;
  1714. }
  1715. Bild *AuswahlBox::getAuswHintergrundBild() const // gibt das Auswahl Hintergrund Bild zurück
  1716. {
  1717. if( hatStyle( Style::MultiStyled ) )
  1718. return 0;
  1719. return auswBgB ? auswBgB->getThis() : 0;
  1720. }
  1721. Bild *AuswahlBox::zAuswHintergrundBild() const
  1722. {
  1723. if( hatStyle( Style::MultiStyled ) )
  1724. return 0;
  1725. return auswBgB;
  1726. }
  1727. LRahmen *AuswahlBox::getMsAuswRahmen( int i ) const // gibt den Multistyle Auswahl Rahmen zurück
  1728. {
  1729. if( !hatStyle( Style::MultiStyled ) )
  1730. return 0;
  1731. if( !msAuswRahmen )
  1732. return 0;
  1733. return msAuswRahmen->z( i ) ? msAuswRahmen->z( i )->getThis() : 0;
  1734. }
  1735. LRahmen *AuswahlBox::zMsAuswRahmen( int i ) const
  1736. {
  1737. if( !hatStyle( Style::MultiStyled ) )
  1738. return 0;
  1739. if( !msAuswRahmen )
  1740. return 0;
  1741. return msAuswRahmen->z( i );
  1742. }
  1743. int AuswahlBox::getMsAuswRahmenFarbe( int i ) const // gibt die Multistyle Auswahl Rahmen Frabe zurück
  1744. {
  1745. if( !hatStyle( Style::MultiStyled ) )
  1746. return 0;
  1747. if( !msAuswRahmen )
  1748. return 0;
  1749. return msAuswRahmen->z( i ) ? msAuswRahmen->z( i )->getFarbe() : 0;
  1750. }
  1751. int AuswahlBox::getMsAuswRahmenBreite( int i ) const // gibt die Multistyle Auswahl Rahmen Breite zurück
  1752. {
  1753. if( !hatStyle( Style::MultiStyled ) )
  1754. return 0;
  1755. if( !msAuswRahmen )
  1756. return 0;
  1757. return msAuswRahmen->z( i ) ? msAuswRahmen->z( i )->getRBreite() : 0;
  1758. }
  1759. AlphaFeld *AuswahlBox::getMsAuswAlphaFeld( int i ) const // gibt das Multistyle Auswahl AlphaFeld zurück
  1760. {
  1761. if( !hatStyle( Style::MultiStyled ) )
  1762. return 0;
  1763. if( !msAuswAf )
  1764. return 0;
  1765. return msAuswAf->z( i ) ? msAuswAf->z( i )->getThis() : 0;
  1766. }
  1767. AlphaFeld *AuswahlBox::zMsAuswAlphaFeld( int i ) const
  1768. {
  1769. if( !hatStyle( Style::MultiStyled ) )
  1770. return 0;
  1771. if( !msAuswAf )
  1772. return 0;
  1773. return msAuswAf->z( i );
  1774. }
  1775. int AuswahlBox::getMsAuswAlphaFeldFarbe( int i ) const // gibt die Multistyle Auswahl AlphaFeld Farbe zurück
  1776. {
  1777. if( !hatStyle( Style::MultiStyled ) )
  1778. return 0;
  1779. if( !msAuswAf )
  1780. return 0;
  1781. return msAuswAf->z( i ) ? msAuswAf->z( i )->getFarbe() : 0;
  1782. }
  1783. int AuswahlBox::getMsAuswAlphaFeldStrength( int i ) const // gibt die Multistyle Auswahl AlphaFeld stärke zurück
  1784. {
  1785. if( !hatStyle( Style::MultiStyled ) )
  1786. return 0;
  1787. if( !msAuswAf )
  1788. return 0;
  1789. return msAuswAf->z( i ) ? msAuswAf->z( i )->getStrength() : 0;
  1790. }
  1791. int AuswahlBox::getMsAuswHintergrundFarbe( int i ) const // gibt die Multistyle Auswahl Hintergrund Farbe zurück
  1792. {
  1793. if( !hatStyle( Style::MultiStyled ) )
  1794. return 0;
  1795. if( !msAuswBgF || !msAuswBgF->hat( i ) )
  1796. return 0;
  1797. return msAuswBgF->get( i );
  1798. }
  1799. Bild *AuswahlBox::getMsAuswHintergrundBild( int i ) const // gibt das Multistyle Auswahl Hintergrund Bild zurück
  1800. {
  1801. if( !hatStyle( Style::MultiStyled ) )
  1802. return 0;
  1803. if( !msAuswBgB )
  1804. return 0;
  1805. return msAuswBgB->get( i );
  1806. }
  1807. Bild *AuswahlBox::zMsAuswHintergrundBild( int i ) const
  1808. {
  1809. if( !hatStyle( Style::MultiStyled ) )
  1810. return 0;
  1811. if( !msAuswBgB )
  1812. return 0;
  1813. return msAuswBgB->z( i );
  1814. }
  1815. LRahmen *AuswahlBox::getMausRahmen() const // gibt den Maus Rahmen zurück
  1816. {
  1817. if( hatStyle( Style::MultiStyled ) )
  1818. return 0;
  1819. return mausRahmen ? mausRahmen->getThis() : 0;
  1820. }
  1821. LRahmen *AuswahlBox::zMausRahmen() const
  1822. {
  1823. if( hatStyle( Style::MultiStyled ) )
  1824. return 0;
  1825. return mausRahmen;
  1826. }
  1827. int AuswahlBox::getMausRahmenFarbe() const // gibt die Maus Rahmen Frabe zurück
  1828. {
  1829. if( hatStyle( Style::MultiStyled ) )
  1830. return 0;
  1831. return mausRahmen ? mausRahmen->getFarbe() : 0;
  1832. }
  1833. int AuswahlBox::getMausRahmenBreite() const // gibt die Maus Rahmen Breite zurück
  1834. {
  1835. if( hatStyle( Style::MultiStyled ) )
  1836. return 0;
  1837. return mausRahmen ? mausRahmen->getRBreite() : 0;
  1838. }
  1839. AlphaFeld *AuswahlBox::getMausAlphaFeld() const // gibt das Maus AlphaFeld zurück
  1840. {
  1841. if( hatStyle( Style::MultiStyled ) )
  1842. return 0;
  1843. return mausAf ? mausAf->getThis() : 0;
  1844. }
  1845. AlphaFeld *AuswahlBox::zMausAlphaFeld() const
  1846. {
  1847. if( hatStyle( Style::MultiStyled ) )
  1848. return 0;
  1849. return mausAf;
  1850. }
  1851. int AuswahlBox::getMausAlphaFeldFarbe() const // gibt die Maus AlphaFeld Farbe zurück
  1852. {
  1853. if( hatStyle( Style::MultiStyled ) )
  1854. return 0;
  1855. return mausAf ? mausAf->getFarbe() : 0;
  1856. }
  1857. int AuswahlBox::getMausAlphaFeldStrength() const // gibt die Maus AlphaFeld stärke zurück
  1858. {
  1859. if( hatStyle( Style::MultiStyled ) )
  1860. return 0;
  1861. return mausAf ? mausAf->getStrength() : 0;
  1862. }
  1863. int AuswahlBox::getMausHintergrundFarbe() const // gibt die Maus Hintergrund Farbe zurück
  1864. {
  1865. if( hatStyle( Style::MultiStyled ) )
  1866. return 0;
  1867. return mausBgF;
  1868. }
  1869. Bild *AuswahlBox::getMausHintergrundBild() const // gibt das Maus Hintergrund Bild zurück
  1870. {
  1871. if( hatStyle( Style::MultiStyled ) )
  1872. return 0;
  1873. return mausBgB ? mausBgB->getThis() : 0;
  1874. }
  1875. Bild *AuswahlBox::zMausHintergrundBild() const
  1876. {
  1877. if( hatStyle( Style::MultiStyled ) )
  1878. return 0;
  1879. return mausBgB;
  1880. }
  1881. LRahmen *AuswahlBox::getMsMausRahmen( int i ) const // gibt den Multistyle Maus Rahmen zurück
  1882. {
  1883. if( !hatStyle( Style::MultiStyled ) )
  1884. return 0;
  1885. if( !msMausRahmen )
  1886. return 0;
  1887. return msMausRahmen->get( i );
  1888. }
  1889. LRahmen *AuswahlBox::zMsMausRahmen( int i ) const
  1890. {
  1891. if( !hatStyle( Style::MultiStyled ) )
  1892. return 0;
  1893. if( !msMausRahmen )
  1894. return 0;
  1895. return msMausRahmen->z( i );
  1896. }
  1897. int AuswahlBox::getMsMausRahmenFarbe( int i ) const // gibt die Multistyle Maus Rahmen Frabe zurück
  1898. {
  1899. if( !hatStyle( Style::MultiStyled ) )
  1900. return 0;
  1901. if( !msMausRahmen )
  1902. return 0;
  1903. return msMausRahmen->z( i ) ? msMausRahmen->z( i )->getFarbe() : 0;
  1904. }
  1905. int AuswahlBox::getMsMausRahmenBreite( int i ) const // gibt die Multistyle Maus Rahmen Breite zurück
  1906. {
  1907. if( !hatStyle( Style::MultiStyled ) )
  1908. return 0;
  1909. if( !msMausRahmen )
  1910. return 0;
  1911. return msMausRahmen->z( i ) ? msMausRahmen->z( i )->getRBreite() : 0;
  1912. }
  1913. AlphaFeld *AuswahlBox::getMsMausAlphaFeld( int i ) const // gibt das Multistyle Maus AlphaFeld zurück
  1914. {
  1915. if( !hatStyle( Style::MultiStyled ) )
  1916. return 0;
  1917. if( !msMausAf )
  1918. return 0;
  1919. return msMausAf->get( i );
  1920. }
  1921. AlphaFeld *AuswahlBox::zMsMausAlphaFeld( int i ) const
  1922. {
  1923. if( !hatStyle( Style::MultiStyled ) )
  1924. return 0;
  1925. if( !msMausAf )
  1926. return 0;
  1927. return msMausAf->z( i );
  1928. }
  1929. int AuswahlBox::getMsMausAlphaFeldFarbe( int i ) const // gibt die Multistyle Maus AlphaFeld Farbe zurück
  1930. {
  1931. if( !hatStyle( Style::MultiStyled ) )
  1932. return 0;
  1933. if( !msMausAf )
  1934. return 0;
  1935. return msMausAf->z( i ) ? msMausAf->z( i )->getFarbe() : 0;
  1936. }
  1937. int AuswahlBox::getMsMausAlphaFeldStrength( int i ) const // gibt die Multistyle Maus AlphaFeld stärke zurück
  1938. {
  1939. if( !hatStyle( Style::MultiStyled ) )
  1940. return 0;
  1941. if( !msMausAf )
  1942. return 0;
  1943. return msMausAf->z( i ) ? msMausAf->z( i )->getStrength() : 0;
  1944. }
  1945. int AuswahlBox::getMsMausHintergrundFarbe( int i ) const // gibt die Multistyle Maus Hintergrund Farbe zurück
  1946. {
  1947. if( !hatStyle( Style::MultiStyled ) )
  1948. return 0;
  1949. if( !msMausBgF || !msMausBgF->hat( i ) )
  1950. return 0;
  1951. return msMausBgF->get( i );
  1952. }
  1953. Bild *AuswahlBox::getMsMausHintergrundBild( int i ) const // gibt das Multistyle Maus Hintergrund Bild zurück
  1954. {
  1955. if( !hatStyle( Style::MultiStyled ) )
  1956. return 0;
  1957. if( !msMausBgB )
  1958. return 0;
  1959. return msMausBgB->get( i );
  1960. }
  1961. Bild *AuswahlBox::zMsMausHintergrundBild( int i ) const
  1962. {
  1963. if( !hatStyle( Style::MultiStyled ) )
  1964. return 0;
  1965. if( !msMausBgB )
  1966. return 0;
  1967. return msMausBgB->z( i );
  1968. }
  1969. bool AuswahlBox::hatMsStyle( int i, __int64 abStyle ) const // prüft ob Multistyle style vorhanden
  1970. {
  1971. if( ( style | Style::MultiStyled ) != style || !msStyle || !msStyle->hat( i ) )
  1972. return 0;
  1973. return ( msStyle->get( i ) | abStyle ) == msStyle->get( i );
  1974. }
  1975. bool AuswahlBox::hatMsStyleNicht( int i, __int64 abStyle ) const // prüft ob Multistyle style nicht vorhanden
  1976. {
  1977. if( ( style | Style::MultiStyled ) != style || !msStyle || !msStyle->hat( i ) )
  1978. return 1;
  1979. return ( msStyle->get( i ) | abStyle ) != msStyle->get( i );
  1980. }
  1981. Zeichnung *AuswahlBox::dublizieren() const // Erzeugt eine Kopie des Zeichnungs
  1982. {
  1983. AuswahlBox *obj = new AuswahlBox();
  1984. obj->setPosition( pos );
  1985. obj->setSize( gr );
  1986. obj->setMausEreignisParameter( makParam );
  1987. obj->setTastaturEreignisParameter( takParam );
  1988. obj->setMausEreignis( Mak );
  1989. obj->setTastaturEreignis( Tak );
  1990. if( toolTip )
  1991. obj->setToolTipText( toolTip->zText()->getText(), toolTip->zBildschirm() );
  1992. obj->setStyle( style );
  1993. if( schrift )
  1994. obj->setSchriftZ( schrift->getThis() );
  1995. if( rahmen )
  1996. obj->setLinienRahmenZ( (LRahmen*)rahmen->dublizieren() );
  1997. if( ausfahren )
  1998. obj->setAusklappKnopfZ( (Knopf*)ausfahren->dublizieren() );
  1999. obj->setHintergrundFarbe( hintergrundFarbe );
  2000. if( hintergrundBild )
  2001. obj->setHintergrundBild( hintergrundBild->getThis() );
  2002. if( hintergrundFeld )
  2003. obj->setAlphaFeldZ( (AlphaFeld*)hintergrundFeld->dublizieren() );
  2004. if( auswRahmen )
  2005. obj->setAuswRahmenZ( (LRahmen*)auswRahmen->dublizieren() );
  2006. obj->setAuswHintergrundFarbe( auswBgF );
  2007. if( auswBgB )
  2008. obj->setAuswHintergrundBild( auswBgB->getThis() );
  2009. if( auswAf )
  2010. obj->setAuswAlphaFeldZ( (AlphaFeld*)auswAf->dublizieren() );
  2011. if( mausRahmen )
  2012. obj->setMausRahmenZ( (LRahmen*)mausRahmen->dublizieren() );
  2013. obj->setMausHintergrundFarbe( mausBgF );
  2014. if( mausBgB )
  2015. obj->setMausHintergrundBild( mausBgB->getThis() );
  2016. if( mausAf )
  2017. obj->setMausAlphaFeldZ( (AlphaFeld*)mausAf->dublizieren() );
  2018. obj->setMaxAuskappHeight( ausklapMaxHeight );
  2019. obj->setEintragHeight( eintragHeight );
  2020. for( int i = 0; i < anzahl; ++i )
  2021. {
  2022. if( members->z( i ) )
  2023. {
  2024. obj->addEintrag( "a" );
  2025. obj->setEintragZ( i, (TextFeld*)members->z( i )->dublizieren() );
  2026. if( msStyle && msStyle->hat( i ) )
  2027. obj->setMsStyle( i, msStyle->get( i ) );
  2028. if( msAuswRahmen && msAuswRahmen->z( i ) )
  2029. obj->setMsAuswRahmenZ( i, (LRahmen*)msAuswRahmen->z( i )->dublizieren() );
  2030. if( msAuswBgF && msAuswBgF->hat( i ) )
  2031. obj->setMsAuswHintergrundFarbe( i, msAuswBgF->get( i ) );
  2032. if( msAuswBgB && msAuswBgB->z( i ) )
  2033. obj->setMsAuswHintergrundBild( i, msAuswBgB->get( i ) );
  2034. if( msAuswAf && msAuswAf->z( i ) )
  2035. obj->setMsAuswAlphaFeldZ( i, (AlphaFeld*)msAuswAf->z( i )->dublizieren() );
  2036. if( msMausRahmen && msMausRahmen->z( i ) )
  2037. obj->setMsMausRahmenZ( i, (LRahmen*)msMausRahmen->z( i )->dublizieren() );
  2038. if( msMausBgF && msMausBgF->hat( i ) )
  2039. obj->setMsMausHintergrundFarbe( i, msMausBgF->get( i ) );
  2040. if( msMausBgB && msMausBgB->z( i ) )
  2041. obj->setMsMausHintergrundBild( i, msMausBgB->get( i ) );
  2042. if( msMausAf && msMausAf->z( i ) )
  2043. obj->setMsMausAlphaFeldZ( i, (AlphaFeld*)msMausAf->z( i )->dublizieren() );
  2044. }
  2045. }
  2046. obj->setAlphaFeldFarbe( auswahl );
  2047. return obj;
  2048. }
  2049. // Reference Counting
  2050. AuswahlBox *AuswahlBox::getThis()
  2051. {
  2052. ++ref;
  2053. return this;
  2054. }
  2055. AuswahlBox *AuswahlBox::release()
  2056. {
  2057. --ref;
  2058. if( !ref )
  2059. delete this;
  2060. return 0;
  2061. }