AuswahlBox.cpp 72 KB

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