AuswahlBox.cpp 72 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213
  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. me = backup;
  823. me.verarbeitet = backup.verarbeitet;
  824. return;
  825. }
  826. removeFokus = 1;
  827. }
  828. 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 )
  829. {
  830. if( removeFokus && me.id == ME_RLinks )
  831. {
  832. if( mak && ( me.verarbeitet || mak( makParam, this, me ) ) )
  833. removeStyle( Style::Fokus );
  834. ausgeklappt = 0;
  835. me.mx -= pos.x, me.my -= pos.y;
  836. if( nmakc && me.verarbeitet && nMak )
  837. me.verarbeitet = nMak( nmakParam, this, me );
  838. me.mx += pos.x, me.my += pos.y;
  839. }
  840. if( toolTip )
  841. toolTip->setMausIn( 0 );
  842. me = backup;
  843. me.verarbeitet = backup.verarbeitet;
  844. return;
  845. }
  846. if( !mausIn && me.id != ME_Leaves )
  847. {
  848. mausIn = 1;
  849. if( toolTip )
  850. toolTip->setMausIn( 1 );
  851. MausEreignis me2;
  852. me2.id = ME_Betritt;
  853. me2.mx = me.mx;
  854. me2.my = me.my;
  855. me2.verarbeitet = 0;
  856. doMausEreignis( me2 );
  857. }
  858. me.mx -= pos.x, me.my -= pos.y;
  859. if( mak && ( me.verarbeitet || mak( makParam, this, me ) ) )
  860. {
  861. bool vera = me.verarbeitet;
  862. if( ausfahren )
  863. {
  864. int tmpMx = me.mx;
  865. int tmpMy = me.my;
  866. if( me.mx > 0 && me.my > 0 && me.mx < gr.x && me.my < gr.y )
  867. me.mx = ausfahren->getX() + 1, me.my = ausfahren->getY() + 1;
  868. else
  869. me.mx = ausfahren->getX() - 1, me.my = ausfahren->getY() - 1;
  870. ausfahren->doMausEreignis( me );
  871. me.mx = tmpMx, me.my = tmpMy;
  872. }
  873. if( me.verarbeitet && !vera && me.id == ME_RLinks )
  874. {
  875. ausgeklappt = !ausgeklappt;
  876. if( ausgeklappt )
  877. mausEintrag = auswahl;
  878. if( scrollAnzeigen )
  879. scrollZuEintrag( mausEintrag );
  880. }
  881. if( removeFokus && me.id == ME_RLinks )
  882. removeStyle( Style::Fokus );
  883. if( !me.verarbeitet && hatStyleNicht( Style::Fokus ) && me.id == ME_RLinks )
  884. addStyle( Style::Fokus );
  885. if( hatStyle( Style::VScroll ) && vertikalScrollBar && ausgeklappt && scrollAnzeigen )
  886. {
  887. int rbr = 0;
  888. if( rahmen && hatStyle( Style::Rahmen ) )
  889. rbr = rahmen->getRBreite();
  890. 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 )
  891. {
  892. vertikalScrollBar->doMausMessage( gr.x - rbr - 15, gr.y, 15, vertikalScrollBar->getScrollData()->anzeige, me );
  893. me.verarbeitet = 1;
  894. }
  895. }
  896. if( !me.verarbeitet )
  897. {
  898. int eintr = -1;
  899. int tmp = me.my - gr.y + ( vertikalScrollBar ? vertikalScrollBar->getScroll() : 0 );
  900. if( hatStyle( Style::MultiStyled ) )
  901. {
  902. for( int i = 0; i < anzahl; ++i )
  903. {
  904. if( tmp > 0 && tmp < ( members->z( i ) ? members->z( i )->getHeight() : 0 ) )
  905. {
  906. eintr = i;
  907. break;
  908. }
  909. tmp -= members->z( i ) ? members->z( i )->getHeight() : 0;
  910. }
  911. }
  912. else
  913. {
  914. for( int i = 0; i < anzahl; ++i )
  915. {
  916. if( tmp > 0 && tmp < eintragHeight )
  917. {
  918. eintr = i;
  919. break;
  920. }
  921. tmp -= eintragHeight;
  922. }
  923. }
  924. if( ausgeklappt && me.mx > 0 && me.mx < gr.x && me.my > gr.y && me.my < gr.y + ausklappHeight )
  925. {
  926. if( eintr >= 0 )
  927. {
  928. if( me.id == ME_RLinks )
  929. {
  930. if( auswahl != eintr )
  931. rend = 1;
  932. auswahl = eintr;
  933. if( eAk )
  934. eAk( eAkP, this, 0, auswahl );
  935. }
  936. if( mausEintrag != eintr )
  937. rend = 1;
  938. mausEintrag = eintr;
  939. }
  940. }
  941. }
  942. me.verarbeitet = 1;
  943. }
  944. if( nmakc && me.verarbeitet && nMak )
  945. me.verarbeitet = nMak( nmakParam, this, me );
  946. me.mx += pos.x, me.my += pos.y;
  947. me = backup;
  948. me.verarbeitet = backup.verarbeitet;
  949. }
  950. void AuswahlBox::doTastaturEreignis( TastaturEreignis &te ) // Tastatur
  951. {
  952. if( te.verarbeitet || hatStyleNicht( Style::Fokus ) || hatStyleNicht( Style::Erlaubt ) )
  953. return;
  954. if( te.id == TE_Release )
  955. {
  956. switch( te.taste )
  957. {
  958. case T_Oben:
  959. if( auswahl > 0 )
  960. --auswahl;
  961. else
  962. auswahl = anzahl - 1;
  963. if( eAk )
  964. eAk( eAkP, this, 0, auswahl );
  965. scrollZuEintrag( auswahl );
  966. rend = 1;
  967. break;
  968. case T_Unten:
  969. if( auswahl < anzahl - 1 )
  970. ++auswahl;
  971. else
  972. auswahl = 0;
  973. if( eAk )
  974. eAk( eAkP, this, 0, auswahl );
  975. scrollZuEintrag( auswahl );
  976. rend = 1;
  977. break;
  978. }
  979. }
  980. if( te.verarbeitet && nTak )
  981. te.verarbeitet = nTak( ntakParam, this, te );
  982. }
  983. void AuswahlBox::render( Bild &zRObj ) // zeichnet nach zRObj
  984. {
  985. if( hatStyle( Style::Sichtbar ) )
  986. {
  987. lockZeichnung();
  988. int br = gr.x;
  989. int hi = gr.y + ausklappHeight;
  990. if( ( ausklappHeight && !zRObj.setDrawOptionsErzwingen( pos.x, pos.y, br, hi ) ) || ( !ausklappHeight && !zRObj.setDrawOptions( pos.x, pos.y, br, hi ) ) )
  991. {
  992. unlockZeichnung();
  993. return;
  994. }
  995. int rbr = 0;
  996. if( hatStyle( Style::Rahmen ) && rahmen ) // Rahmen zeichnen
  997. {
  998. rahmen->setSize( br, hi );
  999. rahmen->render( zRObj );
  1000. rbr = rahmen->getRBreite();
  1001. }
  1002. if( ( ausklappHeight && !zRObj.setDrawOptionsErzwingen( rbr, rbr, br - rbr * 2, hi - rbr * 2 ) ) || ( !ausklappHeight && !zRObj.setDrawOptions( rbr, rbr, br - rbr * 2, hi - rbr * 2 ) ) )
  1003. {
  1004. zRObj.releaseDrawOptions();
  1005. unlockZeichnung();
  1006. return;
  1007. }
  1008. if( hatStyle( Style::Hintergrund ) )
  1009. {
  1010. if( hatStyle( Style::HAlpha ) )
  1011. zRObj.alphaRegion( 0, 0, br, hi, hintergrundFarbe );
  1012. else
  1013. zRObj.fillRegion( 0, 0, br, hi, hintergrundFarbe );
  1014. if( hatStyle( Style::HBild ) && hintergrundBild )
  1015. {
  1016. if( hatStyle( Style::HAlpha ) )
  1017. zRObj.alphaBild( 0, 0, br, hi, *hintergrundBild );
  1018. else
  1019. zRObj.drawBild( 0, 0, br, hi, *hintergrundBild );
  1020. }
  1021. }
  1022. if( hatStyle( Style::Buffered ) && hintergrundFeld )
  1023. {
  1024. hintergrundFeld->setSize( br - rbr * 2, hi - rbr * 2 );
  1025. hintergrundFeld->render( zRObj );
  1026. }
  1027. if( ausfahren ) // Ausklapp Knopf zeichnen
  1028. {
  1029. ausfahren->setSize( gr.y - rbr * 2, gr.y - rbr * 2 );
  1030. ausfahren->setPosition( gr.x - rbr - ausfahren->getBreite(), rbr );
  1031. ausfahren->render( zRObj );
  1032. }
  1033. if( members ) // Ausgewähtes TextFeld zeichnen
  1034. {
  1035. if( auswahl < 0 )
  1036. {
  1037. auswahl = 0;
  1038. if( eAk )
  1039. eAk( eAkP, this, 0, auswahl );
  1040. }
  1041. if( auswahl >= anzahl )
  1042. {
  1043. auswahl = anzahl - 1;
  1044. if( eAk )
  1045. eAk( eAkP, this, 0, auswahl );
  1046. }
  1047. TextFeld *tf = auswahl >= 0 ? members->z( auswahl ) : 0;
  1048. if( tf )
  1049. {
  1050. AlphaFeld *tmpBuffer = 0;
  1051. bool tmpB = 0;
  1052. int tmpHFarbe = 0;
  1053. bool tmpH = 0;
  1054. Bild *tmpHBild = 0;
  1055. bool tmpHB = 0;
  1056. bool tmpHAlpha = 0;
  1057. Rahmen *tmpRahmen = 0;
  1058. bool tmpR = 0;
  1059. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1060. {
  1061. if( hatStyle( Style::AuswahlBuffer ) )
  1062. {
  1063. tmpBuffer = tf->getAlphaFeld();
  1064. tf->setAlphaFeldZ( (AlphaFeld*)auswAf->getThis() );
  1065. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1066. tf->setStyle( TextFeld::Style::Buffered, hatStyle( Style::AuswahlBuffer ) );
  1067. }
  1068. if( hatStyle( Style::AuswahlHintergrund ) )
  1069. {
  1070. tmpH = tf->hatStyle( TextFeld::Style::Hintergrund );
  1071. tmpHFarbe = tf->getHintergrundFarbe();
  1072. tf->setHintergrundFarbe( auswBgF );
  1073. tf->setStyle( TextFeld::Style::Hintergrund, hatStyle( Style::Hintergrund ) );
  1074. if( hatStyle( Style::AuswahlHBild ) )
  1075. {
  1076. tmpHBild = tf->getHintergrundBild();
  1077. tf->setHintergrundBildZ( auswBgB->getThis() );
  1078. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1079. tf->setStyle( TextFeld::Style::HBild, hatStyle( Style::HBild ) );
  1080. }
  1081. if( hatStyle( Style::AuswahlHAlpha ) )
  1082. {
  1083. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1084. tf->setStyle( TextFeld::Style::HAlpha, hatStyle( Style::AuswahlHAlpha ) );
  1085. }
  1086. }
  1087. if( hatStyle( Style::AuswahlRahmen ) )
  1088. {
  1089. tmpRahmen = tf->getRahmen();
  1090. tf->setRahmenZ( (Rahmen*)auswRahmen->getThis() );
  1091. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1092. tf->setStyle( TextFeld::Style::Rahmen, hatStyle( Style::AuswahlRahmen ) );
  1093. }
  1094. }
  1095. else
  1096. {
  1097. if( hatMsStyle( auswahl, Style::AuswahlBuffer ) && msAuswAf )
  1098. {
  1099. tmpBuffer = tf->getAlphaFeld();
  1100. tf->setAlphaFeldZ( msAuswAf->get( auswahl ) );
  1101. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1102. tf->setStyle( TextFeld::Style::Buffered, hatMsStyle( auswahl, Style::AuswahlBuffer ) );
  1103. }
  1104. if( hatMsStyle( auswahl, Style::AuswahlHintergrund ) )
  1105. {
  1106. tmpH = tf->hatStyle( Style::Hintergrund );
  1107. tf->setStyle( TextFeld::Style::Hintergrund, hatMsStyle( auswahl, Style::AuswahlHintergrund ) );
  1108. if( msAuswBgF && msAuswBgF->hat( auswahl ) )
  1109. {
  1110. tmpHFarbe = tf->getHintergrundFarbe();
  1111. tf->setHintergrundFarbe( msAuswBgF->get( auswahl ) );
  1112. }
  1113. if( hatMsStyle( auswahl, Style::AuswahlHBild ) && msAuswBgB )
  1114. {
  1115. tmpHBild = tf->getHintergrundBild();
  1116. tf->setHintergrundBildZ( msAuswBgB->get( auswahl ) );
  1117. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1118. tf->setStyle( TextFeld::Style::HBild, hatMsStyle( auswahl, Style::HBild ) );
  1119. }
  1120. if( hatMsStyle( auswahl, Style::AuswahlHAlpha ) )
  1121. {
  1122. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1123. tf->setStyle( TextFeld::Style::HAlpha, hatMsStyle( auswahl, Style::AuswahlHAlpha ) );
  1124. }
  1125. }
  1126. if( hatMsStyle( auswahl, Style::AuswahlRahmen ) && msAuswRahmen )
  1127. {
  1128. tmpRahmen = tf->getRahmen();
  1129. tf->setRahmenZ( msAuswRahmen->get( auswahl ) );
  1130. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1131. tf->setStyle( TextFeld::Style::Rahmen, hatMsStyle( auswahl, Style::AuswahlRahmen ) );
  1132. }
  1133. }
  1134. int tmpHi = tf->getHeight();
  1135. tf->setPosition( 0, 0 );
  1136. tf->setSize( gr.x - rbr * 2 - ( ausfahren ? ausfahren->getBreite() : 0 ), gr.y - rbr * 2 );
  1137. tf->render( zRObj );
  1138. tf->setSize( tf->getBreite(), tmpHi );
  1139. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1140. {
  1141. if( hatStyle( Style::AuswahlBuffer ) )
  1142. {
  1143. tf->setAlphaFeldZ( tmpBuffer );
  1144. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1145. }
  1146. if( hatStyle( Style::AuswahlHintergrund ) )
  1147. {
  1148. tf->setHintergrundFarbe( tmpHFarbe );
  1149. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1150. if( hatStyle( Style::AuswahlHBild ) )
  1151. {
  1152. tf->setHintergrundBildZ( tmpHBild );
  1153. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1154. }
  1155. if( hatStyle( Style::AuswahlHAlpha ) )
  1156. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1157. }
  1158. if( hatStyle( Style::AuswahlRahmen ) )
  1159. {
  1160. tf->setRahmenZ( tmpRahmen );
  1161. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1162. }
  1163. }
  1164. else
  1165. {
  1166. if( hatMsStyle( auswahl, Style::AuswahlBuffer ) && msAuswAf )
  1167. {
  1168. tf->setAlphaFeldZ( tmpBuffer );
  1169. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1170. }
  1171. if( hatMsStyle( auswahl, Style::AuswahlHintergrund ) )
  1172. {
  1173. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1174. if( msAuswBgF && msAuswBgF->hat( auswahl ) )
  1175. tf->setHintergrundFarbe( tmpHFarbe );
  1176. if( hatMsStyle( auswahl, Style::AuswahlHBild ) && msAuswBgB )
  1177. {
  1178. tf->setHintergrundBildZ( tmpHBild );
  1179. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1180. }
  1181. if( hatMsStyle( auswahl, Style::AuswahlHAlpha ) )
  1182. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1183. }
  1184. if( hatMsStyle( auswahl, Style::AuswahlRahmen ) && msAuswRahmen )
  1185. {
  1186. tf->setRahmenZ( tmpRahmen );
  1187. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1188. }
  1189. }
  1190. }
  1191. }
  1192. bool vsb = hatStyle( Style::VScroll ) && vertikalScrollBar; // Scroll bar zeichnen
  1193. if( auswahl >= anzahl )
  1194. {
  1195. auswahl = 0;
  1196. if( eAk )
  1197. eAk( eAkP, this, 0, auswahl );
  1198. }
  1199. if( members )
  1200. {
  1201. if( vsb && ausklappHeight )
  1202. {
  1203. br -= 15;
  1204. vertikalScrollBar->getScrollData()->anzeige = ausklappHeight - rbr;
  1205. vertikalScrollBar->render( br - rbr, gr.y, 15, ausklappHeight - rbr, zRObj );
  1206. }
  1207. 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 ) ) )
  1208. {
  1209. zRObj.releaseDrawOptions();
  1210. zRObj.releaseDrawOptions();
  1211. unlockZeichnung();
  1212. return;
  1213. }
  1214. int maxHeight = 0;
  1215. int dy = 0;
  1216. if( vsb )
  1217. dy -= vertikalScrollBar->getScroll();
  1218. int mdy = hi - rbr;
  1219. anzahl = members->getEintragAnzahl();
  1220. for( int i = 0; i < anzahl; ++i )
  1221. {
  1222. TextFeld *tf = members->z( i );
  1223. if( dy >= mdy && !vsb )
  1224. break;
  1225. tf->setPosition( 0, dy );
  1226. tf->setSize( br - rbr * 2, tf->getHeight() );
  1227. maxHeight += tf->getHeight();
  1228. bool selected = auswahl == i;
  1229. AlphaFeld *tmpBuffer = 0;
  1230. bool tmpB = 0;
  1231. int tmpHFarbe = 0;
  1232. bool tmpH = 0;
  1233. Bild *tmpHBild = 0;
  1234. bool tmpHB = 0;
  1235. bool tmpHAlpha = 0;
  1236. Rahmen *tmpRahmen = 0;
  1237. bool tmpR = 0;
  1238. if( selected )
  1239. {
  1240. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1241. {
  1242. if( hatStyle( Style::AuswahlBuffer ) )
  1243. {
  1244. tmpBuffer = tf->getAlphaFeld();
  1245. tf->setAlphaFeldZ( (AlphaFeld*)auswAf->getThis() );
  1246. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1247. tf->setStyle( TextFeld::Style::Buffered, hatStyle( Style::AuswahlBuffer ) );
  1248. }
  1249. if( hatStyle( Style::AuswahlHintergrund ) )
  1250. {
  1251. tmpH = tf->hatStyle( TextFeld::Style::Hintergrund );
  1252. tmpHFarbe = tf->getHintergrundFarbe();
  1253. tf->setHintergrundFarbe( auswBgF );
  1254. tf->setStyle( TextFeld::Style::Hintergrund, hatStyle( Style::Hintergrund ) );
  1255. if( hatStyle( Style::AuswahlHBild ) )
  1256. {
  1257. tmpHBild = tf->getHintergrundBild();
  1258. tf->setHintergrundBildZ( auswBgB->getThis() );
  1259. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1260. tf->setStyle( TextFeld::Style::HBild, hatStyle( Style::HBild ) );
  1261. }
  1262. if( hatStyle( Style::AuswahlHAlpha ) )
  1263. {
  1264. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1265. tf->setStyle( TextFeld::Style::HAlpha, hatStyle( Style::AuswahlHAlpha ) );
  1266. }
  1267. }
  1268. if( hatStyle( Style::AuswahlRahmen ) )
  1269. {
  1270. tmpRahmen = tf->getRahmen();
  1271. tf->setRahmenZ( (Rahmen*)auswRahmen->getThis() );
  1272. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1273. tf->setStyle( TextFeld::Style::Rahmen, hatStyle( Style::AuswahlRahmen ) );
  1274. }
  1275. }
  1276. else
  1277. {
  1278. if( hatMsStyle( i, Style::AuswahlBuffer ) && msAuswAf )
  1279. {
  1280. tmpBuffer = tf->getAlphaFeld();
  1281. tf->setAlphaFeldZ( msAuswAf->get( i ) );
  1282. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1283. tf->setStyle( TextFeld::Style::Buffered, hatMsStyle( i, Style::AuswahlBuffer ) );
  1284. }
  1285. if( hatMsStyle( i, Style::AuswahlHintergrund ) )
  1286. {
  1287. tmpH = tf->hatStyle( Style::Hintergrund );
  1288. tf->setStyle( TextFeld::Style::Hintergrund, hatMsStyle( i, Style::AuswahlHintergrund ) );
  1289. if( msAuswBgF && msAuswBgF->hat( i ) )
  1290. {
  1291. tmpHFarbe = tf->getHintergrundFarbe();
  1292. tf->setHintergrundFarbe( msAuswBgF->get( i ) );
  1293. }
  1294. if( hatMsStyle( i, Style::AuswahlHBild ) && msAuswBgB )
  1295. {
  1296. tmpHBild = tf->getHintergrundBild();
  1297. tf->setHintergrundBildZ( msAuswBgB->get( i ) );
  1298. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1299. tf->setStyle( TextFeld::Style::HBild, hatMsStyle( i, Style::HBild ) );
  1300. }
  1301. if( hatMsStyle( i, Style::AuswahlHAlpha ) )
  1302. {
  1303. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1304. tf->setStyle( TextFeld::Style::HAlpha, hatMsStyle( i, Style::AuswahlHAlpha ) );
  1305. }
  1306. }
  1307. if( hatMsStyle( i, Style::AuswahlRahmen ) && msAuswRahmen )
  1308. {
  1309. tmpRahmen = tf->getRahmen();
  1310. tf->setRahmenZ( msAuswRahmen->get( i ) );
  1311. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1312. tf->setStyle( TextFeld::Style::Rahmen, hatMsStyle( i, Style::AuswahlRahmen ) );
  1313. }
  1314. }
  1315. }
  1316. else if( mausEintrag == i )
  1317. {
  1318. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1319. {
  1320. if( hatStyle( Style::MausBuffer ) )
  1321. {
  1322. tmpBuffer = tf->getAlphaFeld();
  1323. tf->setAlphaFeldZ( (AlphaFeld*)mausAf->getThis() );
  1324. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1325. tf->setStyle( TextFeld::Style::Buffered, hatStyle( Style::MausBuffer ) );
  1326. }
  1327. if( hatStyle( Style::MausHintergrund ) )
  1328. {
  1329. tmpH = tf->hatStyle( TextFeld::Style::Hintergrund );
  1330. tmpHFarbe = tf->getHintergrundFarbe();
  1331. tf->setHintergrundFarbe( mausBgF );
  1332. tf->setStyle( TextFeld::Style::Hintergrund, hatStyle( Style::Hintergrund ) );
  1333. if( hatStyle( Style::MausHBild ) )
  1334. {
  1335. tmpHBild = tf->getHintergrundBild();
  1336. tf->setHintergrundBildZ( mausBgB->getThis() );
  1337. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1338. tf->setStyle( TextFeld::Style::HBild, hatStyle( Style::HBild ) );
  1339. }
  1340. if( hatStyle( Style::MausHAlpha ) )
  1341. {
  1342. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1343. tf->setStyle( TextFeld::Style::HAlpha, hatStyle( Style::MausHAlpha ) );
  1344. }
  1345. }
  1346. if( hatStyle( Style::MausRahmen ) )
  1347. {
  1348. tmpRahmen = tf->getRahmen();
  1349. tf->setRahmenZ( (Rahmen*)mausRahmen->getThis() );
  1350. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1351. tf->setStyle( TextFeld::Style::Rahmen, hatStyle( Style::MausRahmen ) );
  1352. }
  1353. }
  1354. else
  1355. {
  1356. if( hatMsStyle( i, Style::MausBuffer ) && msAuswAf )
  1357. {
  1358. tmpBuffer = tf->getAlphaFeld();
  1359. tf->setAlphaFeldZ( msMausAf->get( i ) );
  1360. tmpB = tf->hatStyle( TextFeld::Style::Buffered );
  1361. tf->setStyle( TextFeld::Style::Buffered, hatMsStyle( i, Style::MausBuffer ) );
  1362. }
  1363. if( hatMsStyle( i, Style::MausHintergrund ) )
  1364. {
  1365. tmpH = tf->hatStyle( Style::Hintergrund );
  1366. tf->setStyle( TextFeld::Style::Hintergrund, hatMsStyle( i, Style::MausHintergrund ) );
  1367. if( msMausBgF && msMausBgF->hat( i ) )
  1368. {
  1369. tmpHFarbe = tf->getHintergrundFarbe();
  1370. tf->setHintergrundFarbe( msMausBgF->get( i ) );
  1371. }
  1372. if( hatMsStyle( i, Style::MausHBild ) && msMausBgB )
  1373. {
  1374. tmpHBild = tf->getHintergrundBild();
  1375. tf->setHintergrundBildZ( msMausBgB->get( i ) );
  1376. tmpHB = tf->hatStyle( TextFeld::Style::HBild );
  1377. tf->setStyle( TextFeld::Style::HBild, hatMsStyle( i, Style::HBild ) );
  1378. }
  1379. if( hatMsStyle( i, Style::MausHAlpha ) )
  1380. {
  1381. tmpHAlpha = tf->hatStyle( TextFeld::Style::HAlpha );
  1382. tf->setStyle( TextFeld::Style::HAlpha, hatMsStyle( i, Style::MausHAlpha ) );
  1383. }
  1384. }
  1385. if( hatMsStyle( i, Style::MausRahmen ) && msMausRahmen )
  1386. {
  1387. tmpRahmen = tf->getRahmen();
  1388. tf->setRahmenZ( msMausRahmen->get( i ) );
  1389. tmpR = tf->hatStyle( TextFeld::Style::Rahmen );
  1390. tf->setStyle( TextFeld::Style::Rahmen, hatMsStyle( i, Style::MausRahmen ) );
  1391. }
  1392. }
  1393. }
  1394. tf->render( zRObj );
  1395. if( selected )
  1396. {
  1397. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1398. {
  1399. if( hatStyle( Style::AuswahlBuffer ) )
  1400. {
  1401. tf->setAlphaFeldZ( tmpBuffer );
  1402. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1403. }
  1404. if( hatStyle( Style::AuswahlHintergrund ) )
  1405. {
  1406. tf->setHintergrundFarbe( tmpHFarbe );
  1407. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1408. if( hatStyle( Style::AuswahlHBild ) )
  1409. {
  1410. tf->setHintergrundBildZ( tmpHBild );
  1411. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1412. }
  1413. if( hatStyle( Style::AuswahlHAlpha ) )
  1414. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1415. }
  1416. if( hatStyle( Style::AuswahlRahmen ) )
  1417. {
  1418. tf->setRahmenZ( tmpRahmen );
  1419. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1420. }
  1421. }
  1422. else
  1423. {
  1424. if( hatMsStyle( i, Style::AuswahlBuffer ) && msAuswAf )
  1425. {
  1426. tf->setAlphaFeldZ( tmpBuffer );
  1427. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1428. }
  1429. if( hatMsStyle( i, Style::AuswahlHintergrund ) )
  1430. {
  1431. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1432. if( msAuswBgF && msAuswBgF->hat( i ) )
  1433. tf->setHintergrundFarbe( tmpHFarbe );
  1434. if( hatMsStyle( i, Style::AuswahlHBild ) && msAuswBgB )
  1435. {
  1436. tf->setHintergrundBildZ( tmpHBild );
  1437. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1438. }
  1439. if( hatMsStyle( i, Style::AuswahlHAlpha ) )
  1440. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1441. }
  1442. if( hatMsStyle( i, Style::AuswahlRahmen ) && msAuswRahmen )
  1443. {
  1444. tf->setRahmenZ( tmpRahmen );
  1445. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1446. }
  1447. }
  1448. }
  1449. else if( mausEintrag == i )
  1450. {
  1451. if( hatStyleNicht( Style::MultiStyled ) || !msStyle )
  1452. {
  1453. if( hatStyle( Style::MausBuffer ) )
  1454. {
  1455. tf->setAlphaFeldZ( tmpBuffer );
  1456. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1457. }
  1458. if( hatStyle( Style::MausHintergrund ) )
  1459. {
  1460. tf->setHintergrundFarbe( tmpHFarbe );
  1461. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1462. if( hatStyle( Style::MausHBild ) )
  1463. {
  1464. tf->setHintergrundBildZ( tmpHBild );
  1465. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1466. }
  1467. if( hatStyle( Style::MausHAlpha ) )
  1468. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1469. }
  1470. if( hatStyle( Style::MausRahmen ) )
  1471. {
  1472. tf->setRahmenZ( tmpRahmen );
  1473. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1474. }
  1475. }
  1476. else
  1477. {
  1478. if( hatMsStyle( i, Style::MausBuffer ) && msAuswAf )
  1479. {
  1480. tf->setAlphaFeldZ( tmpBuffer );
  1481. tf->setStyle( TextFeld::Style::Buffered, tmpB );
  1482. }
  1483. if( hatMsStyle( i, Style::MausHintergrund ) )
  1484. {
  1485. tf->setStyle( TextFeld::Style::Hintergrund, tmpH );
  1486. if( msAuswBgF && msAuswBgF->hat( i ) )
  1487. tf->setHintergrundFarbe( tmpHFarbe );
  1488. if( hatMsStyle( i, Style::MausHBild ) && msAuswBgB )
  1489. {
  1490. tf->setHintergrundBildZ( tmpHBild );
  1491. tf->setStyle( TextFeld::Style::HBild, tmpHB );
  1492. }
  1493. if( hatMsStyle( i, Style::MausHAlpha ) )
  1494. tf->setStyle( TextFeld::Style::HAlpha, tmpHAlpha );
  1495. }
  1496. if( hatMsStyle( i, Style::MausRahmen ) && msAuswRahmen )
  1497. {
  1498. tf->setRahmenZ( tmpRahmen );
  1499. tf->setStyle( TextFeld::Style::Rahmen, tmpR );
  1500. }
  1501. }
  1502. }
  1503. dy += tf->getHeight();
  1504. }
  1505. if( vertikalScrollBar )
  1506. vertikalScrollBar->getScrollData()->max = maxHeight;
  1507. zRObj.releaseDrawOptions();
  1508. }
  1509. zRObj.releaseDrawOptions();
  1510. zRObj.releaseDrawOptions();
  1511. unlockZeichnung();
  1512. }
  1513. }
  1514. // constant
  1515. int AuswahlBox::getEintragPos( const char *txt ) const // gibt die Eintrag Position zurück
  1516. {
  1517. for( int i = 0; i < anzahl; ++i )
  1518. if( members->z( i ) && members->z( i )->zText()->istGleich( txt ) )
  1519. return i;
  1520. return -1;
  1521. }
  1522. int AuswahlBox::getEintragPos( Text *txt ) const
  1523. {
  1524. for( int i = 0; i < anzahl; ++i )
  1525. {
  1526. if( members->z( i ) && members->z( i )->zText()->istGleich( txt->getText() ) )
  1527. {
  1528. txt->release();
  1529. return i;
  1530. }
  1531. }
  1532. txt->release();
  1533. return -1;
  1534. }
  1535. Text *AuswahlBox::getEintragText( int i ) const // gibt den Eintrag Text zurück
  1536. {
  1537. if( i >= anzahl )
  1538. return 0;
  1539. return members->z( i ) ? members->z( i )->getText() : 0;
  1540. }
  1541. Text *AuswahlBox::zEintragText( int i ) const
  1542. {
  1543. if( i >= anzahl )
  1544. return 0;
  1545. return members->z( i ) ? members->z( i )->zText() : 0;
  1546. }
  1547. TextFeld *AuswahlBox::getEintrag( int i ) const // gibt den Eintrag zurück
  1548. {
  1549. if( i >= anzahl )
  1550. return 0;
  1551. return members->get( i );
  1552. }
  1553. TextFeld *AuswahlBox::zEintrag( int i ) const
  1554. {
  1555. if( i >= anzahl )
  1556. return 0;
  1557. return members->z( i );
  1558. }
  1559. int AuswahlBox::getAuswahl() const // gibt die Position des ausgewählten Eintrages zurück
  1560. {
  1561. return auswahl;
  1562. }
  1563. int AuswahlBox::getEintragAnzahl() const // gibt die Anzahl der Einträge zurück
  1564. {
  1565. return anzahl;
  1566. }
  1567. bool AuswahlBox::istAusgeklappt() const // prüft, ob die Liste ausgeklappt ist
  1568. {
  1569. return ausgeklappt;
  1570. }
  1571. int AuswahlBox::getMaxHeight() const // gibt die maximale Höhe der Liste zurück
  1572. {
  1573. if( !hatStyle( Style::MaxHeight ) )
  1574. return 0;
  1575. return ausklapMaxHeight;
  1576. }
  1577. int AuswahlBox::getEintragHeight() const // gibt die Höhe der Einträge zurück
  1578. {
  1579. return eintragHeight;
  1580. }
  1581. Knopf *AuswahlBox::getAusklappKnopf() const // gibt den aus-/einklapp Knopf zurück
  1582. {
  1583. if( hatStyle( Style::MultiStyled ) )
  1584. return 0;
  1585. return ausfahren ? (Knopf*)ausfahren->getThis() : 0;
  1586. }
  1587. Knopf *AuswahlBox::zAusklappKnopf() const
  1588. {
  1589. if( hatStyle( Style::MultiStyled ) )
  1590. return 0;
  1591. return ausfahren;
  1592. }
  1593. Rahmen *AuswahlBox::getEintragRahmen( int i ) const // gibt den Eintrag Rahmen zurück
  1594. {
  1595. if( !hatStyle( Style::MultiStyled ) )
  1596. return 0;
  1597. if( !members->z( i ) )
  1598. return 0;
  1599. return members->z( i )->getRahmen();
  1600. }
  1601. Rahmen *AuswahlBox::zEintragRahmen( int i ) const
  1602. {
  1603. if( !hatStyle( Style::MultiStyled ) )
  1604. return 0;
  1605. if( !members->z( i ) )
  1606. return 0;
  1607. return members->z( i )->zRahmen();
  1608. }
  1609. int AuswahlBox::getEintragRahmenFarbe( int i ) const // gibt die Eintrag Rahmen Frabe zurück
  1610. {
  1611. if( !hatStyle( Style::MultiStyled ) )
  1612. return 0;
  1613. if( !members->z( i ) )
  1614. return 0;
  1615. return members->z( i )->getRahmenFarbe();
  1616. }
  1617. int AuswahlBox::getEintragRahmenBreite( int i ) const // gibt die Eintrag Rahmen Breite zurück
  1618. {
  1619. if( !hatStyle( Style::MultiStyled ) )
  1620. return 0;
  1621. if( !members->z( i ) )
  1622. return 0;
  1623. return members->z( i )->getRahmenBreite();
  1624. }
  1625. AlphaFeld *AuswahlBox::getEintragAlphaFeld( int i ) const // gibt das Eintrag AlphaFeld zurück
  1626. {
  1627. if( !hatStyle( Style::MultiStyled ) )
  1628. return 0;
  1629. if( !members->z( i ) )
  1630. return 0;
  1631. return members->z( i )->getAlphaFeld();
  1632. }
  1633. AlphaFeld *AuswahlBox::zEintragAlphaFeld( int i ) const
  1634. {
  1635. if( !hatStyle( Style::MultiStyled ) )
  1636. return 0;
  1637. if( !members->z( i ) )
  1638. return 0;
  1639. return members->z( i )->zAlphaFeld();
  1640. }
  1641. int AuswahlBox::getEintragAlphaFeldFarbe( int i ) const // gibt die Eintrag AlphaFeld Farbe zurück
  1642. {
  1643. if( !hatStyle( Style::MultiStyled ) )
  1644. return 0;
  1645. if( !members->z( i ) )
  1646. return 0;
  1647. return members->z( i )->getAlphaFeldFarbe();
  1648. }
  1649. int AuswahlBox::getEintragAlphaFeldStrength( int i ) const // gibt die Eintrag AlphaFeld stärke zurück
  1650. {
  1651. if( !hatStyle( Style::MultiStyled ) )
  1652. return 0;
  1653. if( !members->z( i ) )
  1654. return 0;
  1655. return members->z( i )->getAlphaFeldStrength();
  1656. }
  1657. int AuswahlBox::getEintragHintergrundFarbe( int i ) const // gibt die Eintrag Hintergrund Farbe zurück
  1658. {
  1659. if( !hatStyle( Style::MultiStyled ) )
  1660. return 0;
  1661. if( !members->z( i ) )
  1662. return 0;
  1663. return members->z( i )->getHintergrundFarbe();
  1664. }
  1665. Bild *AuswahlBox::getEintragHintergrundBild( int i ) const // gibt das Eintrag Hintergrund Bild zurück
  1666. {
  1667. if( !hatStyle( Style::MultiStyled ) )
  1668. return 0;
  1669. if( !members->z( i ) )
  1670. return 0;
  1671. return members->z( i )->getHintergrundBild();
  1672. }
  1673. Bild *AuswahlBox::zEintragHintergrundBild( int i ) const
  1674. {
  1675. if( !hatStyle( Style::MultiStyled ) )
  1676. return 0;
  1677. if( !members->z( i ) )
  1678. return 0;
  1679. return members->z( i )->zHintergrundBild();
  1680. }
  1681. Rahmen *AuswahlBox::getAuswRahmen() const // gibt den Auswahl Rahmen zurück
  1682. {
  1683. if( hatStyle( Style::MultiStyled ) )
  1684. return 0;
  1685. return auswRahmen ? (Rahmen*)auswRahmen->getThis() : 0;
  1686. }
  1687. Rahmen *AuswahlBox::zAuswRahmen() const
  1688. {
  1689. if( hatStyle( Style::MultiStyled ) )
  1690. return 0;
  1691. return auswRahmen;
  1692. }
  1693. int AuswahlBox::getAuswRahmenFarbe() const // gibt die Auswahl Rahmen Frabe zurück
  1694. {
  1695. if( hatStyle( Style::MultiStyled ) )
  1696. return 0;
  1697. return auswRahmen ? auswRahmen->getFarbe() : 0;
  1698. }
  1699. int AuswahlBox::getAuswRahmenBreite() const // gibt die Auswahl Rahmen Breite zurück
  1700. {
  1701. if( hatStyle( Style::MultiStyled ) )
  1702. return 0;
  1703. return auswRahmen ? auswRahmen->getRBreite() : 0;
  1704. }
  1705. AlphaFeld *AuswahlBox::getAuswAlphaFeld() const // gibt das Auswahl AlphaFeld zurück
  1706. {
  1707. if( hatStyle( Style::MultiStyled ) )
  1708. return 0;
  1709. return auswAf ? (AlphaFeld*)auswAf->getThis() : 0;
  1710. }
  1711. AlphaFeld *AuswahlBox::zAuswAlphaFeld() const
  1712. {
  1713. if( hatStyle( Style::MultiStyled ) )
  1714. return 0;
  1715. return auswAf;
  1716. }
  1717. int AuswahlBox::getAuswAlphaFeldFarbe() const // gibt die Auswahl AlphaFeld Farbe zurück
  1718. {
  1719. if( hatStyle( Style::MultiStyled ) )
  1720. return 0;
  1721. return auswAf ? auswAf->getFarbe() : 0;
  1722. }
  1723. int AuswahlBox::getAuswAlphaFeldStrength() const // gibt die Auswahl AlphaFeld stärke zurück
  1724. {
  1725. if( hatStyle( Style::MultiStyled ) )
  1726. return 0;
  1727. return auswAf ? auswAf->getStrength() : 0;
  1728. }
  1729. int AuswahlBox::getAuswHintergrundFarbe() const // gibt die Auswahl Hintergrund Farbe zurück
  1730. {
  1731. if( hatStyle( Style::MultiStyled ) )
  1732. return 0;
  1733. return auswBgF;
  1734. }
  1735. Bild *AuswahlBox::getAuswHintergrundBild() const // gibt das Auswahl Hintergrund Bild zurück
  1736. {
  1737. if( hatStyle( Style::MultiStyled ) )
  1738. return 0;
  1739. return auswBgB ? auswBgB->getThis() : 0;
  1740. }
  1741. Bild *AuswahlBox::zAuswHintergrundBild() const
  1742. {
  1743. if( hatStyle( Style::MultiStyled ) )
  1744. return 0;
  1745. return auswBgB;
  1746. }
  1747. Rahmen *AuswahlBox::getMsAuswRahmen( int i ) const // gibt den Multistyle Auswahl Rahmen zurück
  1748. {
  1749. if( !hatStyle( Style::MultiStyled ) )
  1750. return 0;
  1751. if( !msAuswRahmen )
  1752. return 0;
  1753. return msAuswRahmen->z( i ) ? (Rahmen*)msAuswRahmen->z( i )->getThis() : 0;
  1754. }
  1755. Rahmen *AuswahlBox::zMsAuswRahmen( int i ) const
  1756. {
  1757. if( !hatStyle( Style::MultiStyled ) )
  1758. return 0;
  1759. if( !msAuswRahmen )
  1760. return 0;
  1761. return msAuswRahmen->z( i );
  1762. }
  1763. int AuswahlBox::getMsAuswRahmenFarbe( int i ) const // gibt die Multistyle Auswahl Rahmen Frabe zurück
  1764. {
  1765. if( !hatStyle( Style::MultiStyled ) )
  1766. return 0;
  1767. if( !msAuswRahmen )
  1768. return 0;
  1769. return msAuswRahmen->z( i ) ? msAuswRahmen->z( i )->getFarbe() : 0;
  1770. }
  1771. int AuswahlBox::getMsAuswRahmenBreite( int i ) const // gibt die Multistyle Auswahl Rahmen Breite zurück
  1772. {
  1773. if( !hatStyle( Style::MultiStyled ) )
  1774. return 0;
  1775. if( !msAuswRahmen )
  1776. return 0;
  1777. return msAuswRahmen->z( i ) ? msAuswRahmen->z( i )->getRBreite() : 0;
  1778. }
  1779. AlphaFeld *AuswahlBox::getMsAuswAlphaFeld( int i ) const // gibt das Multistyle Auswahl AlphaFeld zurück
  1780. {
  1781. if( !hatStyle( Style::MultiStyled ) )
  1782. return 0;
  1783. if( !msAuswAf )
  1784. return 0;
  1785. return msAuswAf->z( i ) ? (AlphaFeld*)msAuswAf->z( i )->getThis() : 0;
  1786. }
  1787. AlphaFeld *AuswahlBox::zMsAuswAlphaFeld( int i ) const
  1788. {
  1789. if( !hatStyle( Style::MultiStyled ) )
  1790. return 0;
  1791. if( !msAuswAf )
  1792. return 0;
  1793. return msAuswAf->z( i );
  1794. }
  1795. int AuswahlBox::getMsAuswAlphaFeldFarbe( int i ) const // gibt die Multistyle Auswahl AlphaFeld Farbe zurück
  1796. {
  1797. if( !hatStyle( Style::MultiStyled ) )
  1798. return 0;
  1799. if( !msAuswAf )
  1800. return 0;
  1801. return msAuswAf->z( i ) ? msAuswAf->z( i )->getFarbe() : 0;
  1802. }
  1803. int AuswahlBox::getMsAuswAlphaFeldStrength( int i ) const // gibt die Multistyle Auswahl AlphaFeld stärke zurück
  1804. {
  1805. if( !hatStyle( Style::MultiStyled ) )
  1806. return 0;
  1807. if( !msAuswAf )
  1808. return 0;
  1809. return msAuswAf->z( i ) ? msAuswAf->z( i )->getStrength() : 0;
  1810. }
  1811. int AuswahlBox::getMsAuswHintergrundFarbe( int i ) const // gibt die Multistyle Auswahl Hintergrund Farbe zurück
  1812. {
  1813. if( !hatStyle( Style::MultiStyled ) )
  1814. return 0;
  1815. if( !msAuswBgF || !msAuswBgF->hat( i ) )
  1816. return 0;
  1817. return msAuswBgF->get( i );
  1818. }
  1819. Bild *AuswahlBox::getMsAuswHintergrundBild( int i ) const // gibt das Multistyle Auswahl Hintergrund Bild zurück
  1820. {
  1821. if( !hatStyle( Style::MultiStyled ) )
  1822. return 0;
  1823. if( !msAuswBgB )
  1824. return 0;
  1825. return msAuswBgB->get( i );
  1826. }
  1827. Bild *AuswahlBox::zMsAuswHintergrundBild( int i ) const
  1828. {
  1829. if( !hatStyle( Style::MultiStyled ) )
  1830. return 0;
  1831. if( !msAuswBgB )
  1832. return 0;
  1833. return msAuswBgB->z( i );
  1834. }
  1835. Rahmen *AuswahlBox::getMausRahmen() const // gibt den Maus Rahmen zurück
  1836. {
  1837. if( hatStyle( Style::MultiStyled ) )
  1838. return 0;
  1839. return mausRahmen ? (Rahmen*)mausRahmen->getThis() : 0;
  1840. }
  1841. Rahmen *AuswahlBox::zMausRahmen() const
  1842. {
  1843. if( hatStyle( Style::MultiStyled ) )
  1844. return 0;
  1845. return mausRahmen;
  1846. }
  1847. int AuswahlBox::getMausRahmenFarbe() const // gibt die Maus Rahmen Frabe zurück
  1848. {
  1849. if( hatStyle( Style::MultiStyled ) )
  1850. return 0;
  1851. return mausRahmen ? mausRahmen->getFarbe() : 0;
  1852. }
  1853. int AuswahlBox::getMausRahmenBreite() const // gibt die Maus Rahmen Breite zurück
  1854. {
  1855. if( hatStyle( Style::MultiStyled ) )
  1856. return 0;
  1857. return mausRahmen ? mausRahmen->getRBreite() : 0;
  1858. }
  1859. AlphaFeld *AuswahlBox::getMausAlphaFeld() const // gibt das Maus AlphaFeld zurück
  1860. {
  1861. if( hatStyle( Style::MultiStyled ) )
  1862. return 0;
  1863. return mausAf ? (AlphaFeld*)mausAf->getThis() : 0;
  1864. }
  1865. AlphaFeld *AuswahlBox::zMausAlphaFeld() const
  1866. {
  1867. if( hatStyle( Style::MultiStyled ) )
  1868. return 0;
  1869. return mausAf;
  1870. }
  1871. int AuswahlBox::getMausAlphaFeldFarbe() const // gibt die Maus AlphaFeld Farbe zurück
  1872. {
  1873. if( hatStyle( Style::MultiStyled ) )
  1874. return 0;
  1875. return mausAf ? mausAf->getFarbe() : 0;
  1876. }
  1877. int AuswahlBox::getMausAlphaFeldStrength() const // gibt die Maus AlphaFeld stärke zurück
  1878. {
  1879. if( hatStyle( Style::MultiStyled ) )
  1880. return 0;
  1881. return mausAf ? mausAf->getStrength() : 0;
  1882. }
  1883. int AuswahlBox::getMausHintergrundFarbe() const // gibt die Maus Hintergrund Farbe zurück
  1884. {
  1885. if( hatStyle( Style::MultiStyled ) )
  1886. return 0;
  1887. return mausBgF;
  1888. }
  1889. Bild *AuswahlBox::getMausHintergrundBild() const // gibt das Maus Hintergrund Bild zurück
  1890. {
  1891. if( hatStyle( Style::MultiStyled ) )
  1892. return 0;
  1893. return mausBgB ? mausBgB->getThis() : 0;
  1894. }
  1895. Bild *AuswahlBox::zMausHintergrundBild() const
  1896. {
  1897. if( hatStyle( Style::MultiStyled ) )
  1898. return 0;
  1899. return mausBgB;
  1900. }
  1901. Rahmen *AuswahlBox::getMsMausRahmen( int i ) const // gibt den Multistyle Maus Rahmen zurück
  1902. {
  1903. if( !hatStyle( Style::MultiStyled ) )
  1904. return 0;
  1905. if( !msMausRahmen )
  1906. return 0;
  1907. return msMausRahmen->get( i );
  1908. }
  1909. Rahmen *AuswahlBox::zMsMausRahmen( int i ) const
  1910. {
  1911. if( !hatStyle( Style::MultiStyled ) )
  1912. return 0;
  1913. if( !msMausRahmen )
  1914. return 0;
  1915. return msMausRahmen->z( i );
  1916. }
  1917. int AuswahlBox::getMsMausRahmenFarbe( int i ) const // gibt die Multistyle Maus Rahmen Frabe zurück
  1918. {
  1919. if( !hatStyle( Style::MultiStyled ) )
  1920. return 0;
  1921. if( !msMausRahmen )
  1922. return 0;
  1923. return msMausRahmen->z( i ) ? msMausRahmen->z( i )->getFarbe() : 0;
  1924. }
  1925. int AuswahlBox::getMsMausRahmenBreite( int i ) const // gibt die Multistyle Maus Rahmen Breite zurück
  1926. {
  1927. if( !hatStyle( Style::MultiStyled ) )
  1928. return 0;
  1929. if( !msMausRahmen )
  1930. return 0;
  1931. return msMausRahmen->z( i ) ? msMausRahmen->z( i )->getRBreite() : 0;
  1932. }
  1933. AlphaFeld *AuswahlBox::getMsMausAlphaFeld( int i ) const // gibt das Multistyle Maus AlphaFeld zurück
  1934. {
  1935. if( !hatStyle( Style::MultiStyled ) )
  1936. return 0;
  1937. if( !msMausAf )
  1938. return 0;
  1939. return msMausAf->get( i );
  1940. }
  1941. AlphaFeld *AuswahlBox::zMsMausAlphaFeld( int i ) const
  1942. {
  1943. if( !hatStyle( Style::MultiStyled ) )
  1944. return 0;
  1945. if( !msMausAf )
  1946. return 0;
  1947. return msMausAf->z( i );
  1948. }
  1949. int AuswahlBox::getMsMausAlphaFeldFarbe( int i ) const // gibt die Multistyle Maus AlphaFeld Farbe zurück
  1950. {
  1951. if( !hatStyle( Style::MultiStyled ) )
  1952. return 0;
  1953. if( !msMausAf )
  1954. return 0;
  1955. return msMausAf->z( i ) ? msMausAf->z( i )->getFarbe() : 0;
  1956. }
  1957. int AuswahlBox::getMsMausAlphaFeldStrength( int i ) const // gibt die Multistyle Maus AlphaFeld stärke zurück
  1958. {
  1959. if( !hatStyle( Style::MultiStyled ) )
  1960. return 0;
  1961. if( !msMausAf )
  1962. return 0;
  1963. return msMausAf->z( i ) ? msMausAf->z( i )->getStrength() : 0;
  1964. }
  1965. int AuswahlBox::getMsMausHintergrundFarbe( int i ) const // gibt die Multistyle Maus Hintergrund Farbe zurück
  1966. {
  1967. if( !hatStyle( Style::MultiStyled ) )
  1968. return 0;
  1969. if( !msMausBgF || !msMausBgF->hat( i ) )
  1970. return 0;
  1971. return msMausBgF->get( i );
  1972. }
  1973. Bild *AuswahlBox::getMsMausHintergrundBild( int i ) const // gibt das Multistyle Maus Hintergrund Bild zurück
  1974. {
  1975. if( !hatStyle( Style::MultiStyled ) )
  1976. return 0;
  1977. if( !msMausBgB )
  1978. return 0;
  1979. return msMausBgB->get( i );
  1980. }
  1981. Bild *AuswahlBox::zMsMausHintergrundBild( int i ) const
  1982. {
  1983. if( !hatStyle( Style::MultiStyled ) )
  1984. return 0;
  1985. if( !msMausBgB )
  1986. return 0;
  1987. return msMausBgB->z( i );
  1988. }
  1989. bool AuswahlBox::hatMsStyle( int i, __int64 abStyle ) const // prüft ob Multistyle style vorhanden
  1990. {
  1991. if( ( style | Style::MultiStyled ) != style || !msStyle || !msStyle->hat( i ) )
  1992. return 0;
  1993. return ( msStyle->get( i ) | abStyle ) == msStyle->get( i );
  1994. }
  1995. bool AuswahlBox::hatMsStyleNicht( int i, __int64 abStyle ) const // prüft ob Multistyle style nicht vorhanden
  1996. {
  1997. if( ( style | Style::MultiStyled ) != style || !msStyle || !msStyle->hat( i ) )
  1998. return 1;
  1999. return ( msStyle->get( i ) | abStyle ) != msStyle->get( i );
  2000. }
  2001. Zeichnung *AuswahlBox::dublizieren() const // Erzeugt eine Kopie des Zeichnungs
  2002. {
  2003. AuswahlBox *obj = new AuswahlBox();
  2004. obj->setPosition( pos );
  2005. obj->setSize( gr );
  2006. obj->setMausEreignisParameter( makParam );
  2007. obj->setTastaturEreignisParameter( takParam );
  2008. obj->setMausEreignis( mak );
  2009. obj->setTastaturEreignis( tak );
  2010. if( toolTip )
  2011. obj->setToolTipZ( (ToolTip*)toolTip->dublizieren() );
  2012. obj->setStyle( style );
  2013. if( textRd )
  2014. obj->setTextRendererZ( textRd->getThis() );
  2015. if( rahmen )
  2016. obj->setRahmenZ( (Rahmen*)rahmen->dublizieren() );
  2017. if( ausfahren )
  2018. obj->setAusklappKnopfZ( (Knopf*)ausfahren->dublizieren() );
  2019. obj->setHintergrundFarbe( hintergrundFarbe );
  2020. if( hintergrundBild )
  2021. obj->setHintergrundBild( hintergrundBild->getThis() );
  2022. if( hintergrundFeld )
  2023. obj->setAlphaFeldZ( (AlphaFeld*)hintergrundFeld->dublizieren() );
  2024. if( auswRahmen )
  2025. obj->setAuswRahmenZ( (Rahmen*)auswRahmen->dublizieren() );
  2026. obj->setAuswHintergrundFarbe( auswBgF );
  2027. if( auswBgB )
  2028. obj->setAuswHintergrundBild( auswBgB->getThis() );
  2029. if( auswAf )
  2030. obj->setAuswAlphaFeldZ( (AlphaFeld*)auswAf->dublizieren() );
  2031. if( mausRahmen )
  2032. obj->setMausRahmenZ( (Rahmen*)mausRahmen->dublizieren() );
  2033. obj->setMausHintergrundFarbe( mausBgF );
  2034. if( mausBgB )
  2035. obj->setMausHintergrundBild( mausBgB->getThis() );
  2036. if( mausAf )
  2037. obj->setMausAlphaFeldZ( (AlphaFeld*)mausAf->dublizieren() );
  2038. obj->setMaxAuskappHeight( ausklapMaxHeight );
  2039. obj->setEintragHeight( eintragHeight );
  2040. for( int i = 0; i < anzahl; ++i )
  2041. {
  2042. if( members->z( i ) )
  2043. {
  2044. obj->addEintrag( "a" );
  2045. obj->setEintragZ( i, (TextFeld*)members->z( i )->dublizieren() );
  2046. if( msStyle && msStyle->hat( i ) )
  2047. obj->setMsStyle( i, msStyle->get( i ) );
  2048. if( msAuswRahmen && msAuswRahmen->z( i ) )
  2049. obj->setMsAuswRahmenZ( i, (Rahmen*)msAuswRahmen->z( i )->dublizieren() );
  2050. if( msAuswBgF && msAuswBgF->hat( i ) )
  2051. obj->setMsAuswHintergrundFarbe( i, msAuswBgF->get( i ) );
  2052. if( msAuswBgB && msAuswBgB->z( i ) )
  2053. obj->setMsAuswHintergrundBild( i, msAuswBgB->get( i ) );
  2054. if( msAuswAf && msAuswAf->z( i ) )
  2055. obj->setMsAuswAlphaFeldZ( i, (AlphaFeld*)msAuswAf->z( i )->dublizieren() );
  2056. if( msMausRahmen && msMausRahmen->z( i ) )
  2057. obj->setMsMausRahmenZ( i, (Rahmen*)msMausRahmen->z( i )->dublizieren() );
  2058. if( msMausBgF && msMausBgF->hat( i ) )
  2059. obj->setMsMausHintergrundFarbe( i, msMausBgF->get( i ) );
  2060. if( msMausBgB && msMausBgB->z( i ) )
  2061. obj->setMsMausHintergrundBild( i, msMausBgB->get( i ) );
  2062. if( msMausAf && msMausAf->z( i ) )
  2063. obj->setMsMausAlphaFeldZ( i, (AlphaFeld*)msMausAf->z( i )->dublizieren() );
  2064. }
  2065. }
  2066. obj->setAlphaFeldFarbe( auswahl );
  2067. return obj;
  2068. }