<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://library.morph.zone/index.php?action=history&amp;feed=atom&amp;title=%22Hello_world%21%22_w_MUI</id>
		<title>&quot;Hello world!&quot; w MUI - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://library.morph.zone/index.php?action=history&amp;feed=atom&amp;title=%22Hello_world%21%22_w_MUI"/>
		<link rel="alternate" type="text/html" href="http://library.morph.zone/index.php?title=%22Hello_world!%22_w_MUI&amp;action=history"/>
		<updated>2026-05-15T01:56:33Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://library.morph.zone/index.php?title=%22Hello_world!%22_w_MUI&amp;diff=1151&amp;oldid=prev</id>
		<title>Krashan: Translation finished.</title>
		<link rel="alternate" type="text/html" href="http://library.morph.zone/index.php?title=%22Hello_world!%22_w_MUI&amp;diff=1151&amp;oldid=prev"/>
				<updated>2011-01-20T07:46:35Z</updated>
		
		<summary type="html">&lt;p&gt;Translation finished.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 07:46, 20 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot; &gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Powyższa funkcja tworzy kompletne drzewo obiektów dla naszego programu. Główny obiekt jest klasy ''Application''. Posiada obiekt podrzędny klasy ''Window''. Okno z kolei posiada obiekt główny (ang. ''root object''), który zawsze jest instancją klasy ''Group''. Wreszcie grupa główna zawiera w sobie obiekt klasy ''Text''. Przy tworzeniu obiektu aplikacji podano 6 atrybutów pełniących rolę opisową. Wartości tych artrybutów są wykorzystywane przez system w różnych miejscach. Znaczenie tych atrybutów wyjaśnione jest w dokumentacji klasy ''Application'' znajdującej się w pakiecie SDK. Znaczenie pozostałych atrybutów w sposób raczej oczywisty wynika z ich nazw, szczegóły są omówione w dokumentacji odpowiednich klas.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Powyższa funkcja tworzy kompletne drzewo obiektów dla naszego programu. Główny obiekt jest klasy ''Application''. Posiada obiekt podrzędny klasy ''Window''. Okno z kolei posiada obiekt główny (ang. ''root object''), który zawsze jest instancją klasy ''Group''. Wreszcie grupa główna zawiera w sobie obiekt klasy ''Text''. Przy tworzeniu obiektu aplikacji podano 6 atrybutów pełniących rolę opisową. Wartości tych artrybutów są wykorzystywane przez system w różnych miejscach. Znaczenie tych atrybutów wyjaśnione jest w dokumentacji klasy ''Application'' znajdującej się w pakiecie SDK. Znaczenie pozostałych atrybutów w sposób raczej oczywisty wynika z ich nazw, szczegóły są omówione w dokumentacji odpowiednich klas.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sposób stworzenia interfejsu graficznego w tym programie jest typowy dla MUI. Kompletne drzewo obiektów jest tworzone w jdnym dużym wywołaniu funkcji ''MUI_NewObject()'' zawierającym w sobie zagnieżdżone podwywołania. Kolejność wywoływania funkcji jest odwrotna od kolejności czytania kodu. Na początku tworzone są najgłębiej zagnieżdżone obiekty, a otrzymane wskaźniki są podawane do konstruktorów obiektów nadrzędnych.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sposób stworzenia interfejsu graficznego w tym programie jest typowy dla MUI. Kompletne drzewo obiektów jest tworzone w jdnym dużym wywołaniu funkcji ''MUI_NewObject()'' zawierającym w sobie zagnieżdżone podwywołania. Kolejność wywoływania funkcji jest odwrotna od kolejności czytania kodu. Na początku tworzone są najgłębiej zagnieżdżone obiekty, a otrzymane wskaźniki są podawane do konstruktorów obiektów nadrzędnych. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ostatnim tworzonym obiektem jest obiekt aplikacji. Ten sposób tworzenia drzewa obiektów zapewnia automatyczną obsługę błędów&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Jeżeli którykolwiek konstruktor nie będzie w stanie stworzyć obiektu, jego wynikiem będzie wskaźnik zerowy (&lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;NULL&lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Wskaźnik ten zostanie przekazany do konstruktora obiektu nadrzędnego&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;co automatycznie spowoduje błąd konstrukcji i również zwrócenie &lt;/ins&gt;''NULL''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;-&lt;/ins&gt;a, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;oraz zniszczenie tych obiektów podrzędnych, które udało się stworzyć do momentu błędu&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ostatecznie wskaźnik zerowy dotrze do konstruktora obiektu aplikacji, również powodując jego błąd i zwrócenie &lt;/ins&gt;''NULL&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;''-a przez główne wywołanie ''MUI_NewObject()&lt;/ins&gt;''. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;W efekcie drzewo obiektów aplikacji może mieć po konstrukcji tylko dwa stany&lt;/ins&gt;: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;albo jest w pełni zbudowane&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;albo nie jest w ogóle zbudowane, a wszystkie obiekty zostały prawidłowo zniszczone&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;To w zasadniczy sposób upraszcza obsługę błędów&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The function illustrates a typical way of creating a MUI interface&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The complete object tree is created in one big &lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;MUI_NewObject()&lt;/del&gt;'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;call containing nested sub-calls&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The order of code execution is different to the order of reading. The most nested objects are created first and passed to constructors of their parents. The application object is created last. This way of creating the application also ensures automatic error handling. If any of constructors fails&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it passes &lt;/del&gt;''NULL'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;to &lt;/del&gt;a &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;parent constructor&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;making it fail too and then dispose all successfully constructed child objects&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Finally the application constructor fails and returns &lt;/del&gt;''NULL''. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Then only two states of the application are possible&lt;/del&gt;: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;either the application is fully constructed&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;or it is not constructed at all&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This behaviour greatly simplifies error handling&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; void notifications(void)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; void notifications(void)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l47&quot; &gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 45:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The next step is &lt;/del&gt;to &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;make notifications&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This simple program contains only one notification&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;which terminates the &lt;/del&gt;program &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;after the window close gadget is clicked&lt;/del&gt;. MUI &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;maps a left mouse button click on the gadget to a change of &lt;/del&gt;''MUIA_Window_CloseRequest'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;attribute&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The notification target is the application&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/del&gt;''MUIM_Application_ReturnID()'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;method then passes the quit action identifier to the main loop&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Następny krok &lt;/ins&gt;to &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ustawienie [[Programowanie sterowane zdarzeniami, notyfikacje#Notyfikacje w MUI|notyfikacji]]&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ten prosty przykład zawiera tylko jedną notyfikację&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;kończącą &lt;/ins&gt;program &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;po kliknięciu gadżetu zamknięcia okna&lt;/ins&gt;. MUI &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;mapuje kliknięcie lewym przyciskiem myszy w gadżet zamknięcia okna na zmianę wartości atrybutu &lt;/ins&gt;''MUIA_Window_CloseRequest''. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Celem notyfikacji jest obiekt aplikacji&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;metoda &lt;/ins&gt;''MUIM_Application_ReturnID()'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;przekazuje podany identyfikator do głównej pętli programu&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; void main_loop(void)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; void main_loop(void)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l64&quot; &gt;Line 64:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 62:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The standard main loop has been discussed in the &lt;/del&gt;[[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Event_Driven_Programming&lt;/del&gt;,&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;_Notifications&lt;/del&gt;#&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The_Ideal_MUI_Main_Loop&lt;/del&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;previous chapter&lt;/del&gt;]]. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The only addition is opening the window before the loop and closing it after&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Typowa pętla główna została omówiona w &lt;/ins&gt;[[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Programowanie sterowane zdarzeniami&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;notyfikacje&lt;/ins&gt;#&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Idealna pętla główna&lt;/ins&gt;|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;poprzednim rozdziale&lt;/ins&gt;]]. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Jedyną nowością jest otwarcie okna przed wejściem w pętlę i zamknięcie po wyjściu z niej&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; int main(void)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; int main(void)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l80&quot; &gt;Line 80:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 78:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Finally&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the main function of the &lt;/del&gt;program. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;It builds the object tree first and checks if it succeeded. In case of a fail&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the program ends immediately. After all the objects are created&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;notifications are added and the &lt;/del&gt;program &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;enters the main loop&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;When the loop finishes&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the application object is disposed. It also disposes all its sub-objects&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Na koniec główna funkcja programu. Na początku tworzone jest drzewo obiektów&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;po czym następuje sprawdzenie czy tworzenie drzewa zakończyło się sukcesem. W przypadku błędu &lt;/ins&gt;program &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;natychmiast kończy swoje działanie&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Jeżeli interfejs graficzny został stworzony poprawnie&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ustawiane są notyfikacje&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;a następnie &lt;/ins&gt;program &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;wchodzi do głównej pętli&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Po zakończeniu tejże obiekt aplikacji jest niszczony&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;co automatycznie powoduje zniszczenie również wszystkich obiektów podrzędnych&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	<entry>
		<id>http://library.morph.zone/index.php?title=%22Hello_world!%22_w_MUI&amp;diff=1149&amp;oldid=prev</id>
		<title>Krashan: Translation in progress.</title>
		<link rel="alternate" type="text/html" href="http://library.morph.zone/index.php?title=%22Hello_world!%22_w_MUI&amp;diff=1149&amp;oldid=prev"/>
				<updated>2011-01-20T07:22:47Z</updated>
		
		<summary type="html">&lt;p&gt;Translation in progress.&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 07:22, 20 January 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;''Grzegorz Kraszewski''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;''Grzegorz Kraszewski''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;small&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This article in other languages&lt;/del&gt;: [[&amp;quot;Hello world!&amp;quot; &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;w &lt;/del&gt;MUI|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Polish&lt;/del&gt;]]&amp;lt;/small&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;small&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ten artykuł w innych językach&lt;/ins&gt;: [[&amp;quot;Hello world!&amp;quot; &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;in &lt;/ins&gt;MUI|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;angielski&lt;/ins&gt;]]&amp;lt;/small&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:helloworld.png|left]] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;This is the window of the example &lt;/del&gt;MUI &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;application&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;It is very simple&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;it contains only one static text object and no gadgets&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;except for window border gadgets&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Note that the number of gadgets on the right side of the window depends on user &lt;/del&gt;MUI &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;settings&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The source code of the application is very simple too and fits into &lt;/del&gt;60 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;lines&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;including proper vertical spacing&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;It is cut in pieces in the article for better reading&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;A complete, ready to compile version &lt;/del&gt;[http://krashan.ppa.pl/morphzone_tutorials/helloworld_mui.c &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;is available&lt;/del&gt;] &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;too&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:helloworld.png|left]] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Oto okno przykładowego programu w &lt;/ins&gt;MUI. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Program jest bardzo prosty&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;okno zawiera tylko jeden obiekt tekstowy i żadnych gadżetów&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;oprócz tych na ramce&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Ilość gadżetów znajdujących się po prawej stronie górnej belki okna zależy od ustawień &lt;/ins&gt;MUI. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Kod źródłowy tego programu jest również bardzo prosty i mieści się w &lt;/ins&gt;60 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;liniach&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;licząc również puste linie zwiększające jego przejrzystość&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;W artykule kod jest rozbity na części, aby tekst był łatwiejszy w czytaniu&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Dostępna jest też &lt;/ins&gt;[http://krashan.ppa.pl/morphzone_tutorials/helloworld_mui.c &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pełna wersja&lt;/ins&gt;] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;kodu gotowa do skompilowania&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #include &amp;lt;proto/muimaster.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #include &amp;lt;proto/muimaster.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #include &amp;lt;proto/intuition.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #include &amp;lt;proto/intuition.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Header files for &lt;/del&gt;''muimaster.library'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;and &lt;/del&gt;''intuition.library'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;are included&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Note that these libraries will be &lt;/del&gt;[[MorphOS_API_and_Its_Organization#How_to_Use_a_Library_in_an_Application|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;opened and closed automatically&lt;/del&gt;]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Zaczynamy od dołączenia plików nagłówkowych bibliotek &lt;/ins&gt;''muimaster.library'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;i &lt;/ins&gt;''intuition.library''. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Warto zauważyć, że biblioteki te &lt;/ins&gt;[[MorphOS_API_and_Its_Organization#How_to_Use_a_Library_in_an_Application|&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;będą otwarte i zamknięte automatycznie&lt;/ins&gt;]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; Object *App, *Win;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; Object *App, *Win;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Global pointers for the application object and the window object&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;While using many global variables is considered inelegant&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;having globals for the most important objects is handy&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;especially in such a small project&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Tutaj mamy globalne wskaźniki na obiekt aplikacji i obiekt okna&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Trzymanie wskaźników do wielu obiektów MUI w zmiennych globalnych nie jest zbyt eleganckim stylem programowania&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;ale kilka to jeszcze nie tragedia&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;zwłaszcza w tak prostym programie&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; Object* build_gui(void)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; Object* build_gui(void)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l35&quot; &gt;Line 35:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 35:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The above function creates the complete object tree for &lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;HelloWorld&lt;/del&gt;''. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The master object is the &lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Application&lt;/del&gt;'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;class instance&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;It has a &lt;/del&gt;''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Window&lt;/del&gt;'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;object. The window root is a &lt;/del&gt;''Group'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;object containing one &lt;/del&gt;''Text'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;object&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The application object has &lt;/del&gt;6 &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;attributes working as descriptors used in different places in the system&lt;/del&gt;. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;They are not required for running the program, but help integrating it with the &lt;/del&gt;system. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The meaning of these attributes is explained in the autodoc of &lt;/del&gt;''Application'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;class in the &lt;/del&gt;SDK. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;The rest of the attributes are self-explaining&lt;/del&gt;, &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;please refer to the autodocs of respective &lt;/del&gt;MUI &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;classes for details&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Powyższa funkcja tworzy kompletne drzewo obiektów dla naszego programu. Główny obiekt jest klasy &lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Application&lt;/ins&gt;''. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Posiada obiekt podrzędny klasy &lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Window&lt;/ins&gt;''. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Okno z kolei posiada obiekt główny (ang. &lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;root object&lt;/ins&gt;''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;), który zawsze jest instancją klasy &lt;/ins&gt;''Group''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. Wreszcie grupa główna zawiera w sobie obiekt klasy &lt;/ins&gt;''Text''. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Przy tworzeniu obiektu aplikacji podano &lt;/ins&gt;6 &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;atrybutów pełniących rolę opisową&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Wartości tych artrybutów są wykorzystywane przez &lt;/ins&gt;system &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;w różnych miejscach&lt;/ins&gt;. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Znaczenie tych atrybutów wyjaśnione jest w dokumentacji klasy &lt;/ins&gt;''Application'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;znajdującej się w pakiecie &lt;/ins&gt;SDK. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Znaczenie pozostałych atrybutów w sposób raczej oczywisty wynika z ich nazw&lt;/ins&gt;, &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;szczegóły są omówione w dokumentacji odpowiednich klas.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Sposób stworzenia interfejsu graficznego w tym programie jest typowy dla &lt;/ins&gt;MUI&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. Kompletne drzewo obiektów jest tworzone w jdnym dużym wywołaniu funkcji ''MUI_NewObject()'' zawierającym w sobie zagnieżdżone podwywołania. Kolejność wywoływania funkcji jest odwrotna od kolejności czytania kodu. Na początku tworzone są najgłębiej zagnieżdżone obiekty, a otrzymane wskaźniki są podawane do konstruktorów obiektów nadrzędnych&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The function illustrates a typical way of creating a MUI interface. The complete object tree is created in one big ''MUI_NewObject()'' call containing nested sub-calls. The order of code execution is different to the order of reading. The most nested objects are created first and passed to constructors of their parents. The application object is created last. This way of creating the application also ensures automatic error handling. If any of constructors fails, it passes ''NULL'' to a parent constructor, making it fail too and then dispose all successfully constructed child objects. Finally the application constructor fails and returns ''NULL''. Then only two states of the application are possible: either the application is fully constructed, or it is not constructed at all. This behaviour greatly simplifies error handling.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The function illustrates a typical way of creating a MUI interface. The complete object tree is created in one big ''MUI_NewObject()'' call containing nested sub-calls. The order of code execution is different to the order of reading. The most nested objects are created first and passed to constructors of their parents. The application object is created last. This way of creating the application also ensures automatic error handling. If any of constructors fails, it passes ''NULL'' to a parent constructor, making it fail too and then dispose all successfully constructed child objects. Finally the application constructor fails and returns ''NULL''. Then only two states of the application are possible: either the application is fully constructed, or it is not constructed at all. This behaviour greatly simplifies error handling.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	<entry>
		<id>http://library.morph.zone/index.php?title=%22Hello_world!%22_w_MUI&amp;diff=1148&amp;oldid=prev</id>
		<title>Krashan: Polish translation started by copying English text.</title>
		<link rel="alternate" type="text/html" href="http://library.morph.zone/index.php?title=%22Hello_world!%22_w_MUI&amp;diff=1148&amp;oldid=prev"/>
				<updated>2011-01-20T06:54:32Z</updated>
		
		<summary type="html">&lt;p&gt;Polish translation started by copying English text.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;''Grzegorz Kraszewski''&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;small&amp;gt;This article in other languages: [[&amp;quot;Hello world!&amp;quot; w MUI|Polish]]&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:helloworld.png|left]] This is the window of the example MUI application. It is very simple, it contains only one static text object and no gadgets, except for window border gadgets. Note that the number of gadgets on the right side of the window depends on user MUI settings. The source code of the application is very simple too and fits into 60 lines, including proper vertical spacing. It is cut in pieces in the article for better reading. A complete, ready to compile version [http://krashan.ppa.pl/morphzone_tutorials/helloworld_mui.c is available] too.&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;proto/muimaster.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;proto/intuition.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Header files for ''muimaster.library'' and ''intuition.library'' are included. Note that these libraries will be [[MorphOS_API_and_Its_Organization#How_to_Use_a_Library_in_an_Application|opened and closed automatically]].&lt;br /&gt;
 &lt;br /&gt;
 Object *App, *Win;&lt;br /&gt;
&lt;br /&gt;
Global pointers for the application object and the window object. While using many global variables is considered inelegant, having globals for the most important objects is handy, especially in such a small project.&lt;br /&gt;
 &lt;br /&gt;
 Object* build_gui(void)&lt;br /&gt;
 {&lt;br /&gt;
   App = MUI_NewObject(MUIC_Application,&lt;br /&gt;
     MUIA_Application_Author, (ULONG)&amp;quot;Grzegorz Kraszewski&amp;quot;,&lt;br /&gt;
     MUIA_Application_Base, (ULONG)&amp;quot;HELLOWORLD&amp;quot;,&lt;br /&gt;
     MUIA_Application_Copyright, (ULONG)&amp;quot;© 2010 Grzegorz Kraszewski&amp;quot;,&lt;br /&gt;
     MUIA_Application_Description, (ULONG)&amp;quot;Hello World in MUI.&amp;quot;,&lt;br /&gt;
     MUIA_Application_Title, (ULONG)&amp;quot;Hello World&amp;quot;,&lt;br /&gt;
     MUIA_Application_Version, (ULONG)&amp;quot;$VER: HelloWorld 1.0 (16.11.2010)&amp;quot;,&lt;br /&gt;
     MUIA_Application_Window, (ULONG)(Win = MUI_NewObject(MUIC_Window,&lt;br /&gt;
       MUIA_Window_Title, (ULONG)&amp;quot;Hello World&amp;quot;,&lt;br /&gt;
       MUIA_Window_RootObject, MUI_NewObject(MUIC_Group,&lt;br /&gt;
         MUIA_Group_Child, MUI_NewObject(MUIC_Text,&lt;br /&gt;
           MUIA_Text_Contents, (ULONG)&amp;quot;Hello world!&amp;quot;,&lt;br /&gt;
         TAG_END),&lt;br /&gt;
       TAG_END),&lt;br /&gt;
     TAG_END)),&lt;br /&gt;
   TAG_END);&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
The above function creates the complete object tree for ''HelloWorld''. The master object is the ''Application'' class instance. It has a ''Window'' object. The window root is a ''Group'' object containing one ''Text'' object. The application object has 6 attributes working as descriptors used in different places in the system. They are not required for running the program, but help integrating it with the system. The meaning of these attributes is explained in the autodoc of ''Application'' class in the SDK. The rest of the attributes are self-explaining, please refer to the autodocs of respective MUI classes for details.&lt;br /&gt;
&lt;br /&gt;
The function illustrates a typical way of creating a MUI interface. The complete object tree is created in one big ''MUI_NewObject()'' call containing nested sub-calls. The order of code execution is different to the order of reading. The most nested objects are created first and passed to constructors of their parents. The application object is created last. This way of creating the application also ensures automatic error handling. If any of constructors fails, it passes ''NULL'' to a parent constructor, making it fail too and then dispose all successfully constructed child objects. Finally the application constructor fails and returns ''NULL''. Then only two states of the application are possible: either the application is fully constructed, or it is not constructed at all. This behaviour greatly simplifies error handling.&lt;br /&gt;
&lt;br /&gt;
 void notifications(void)&lt;br /&gt;
 {&lt;br /&gt;
   DoMethod(Win, MUIM_Notify, MUIA_Window_CloseRequest, TRUE, App, 2,&lt;br /&gt;
    MUIM_Application_ReturnID, MUIV_Application_ReturnID_Quit);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The next step is to make notifications. This simple program contains only one notification, which terminates the program after the window close gadget is clicked. MUI maps a left mouse button click on the gadget to a change of ''MUIA_Window_CloseRequest'' attribute. The notification target is the application, the ''MUIM_Application_ReturnID()'' method then passes the quit action identifier to the main loop.&lt;br /&gt;
&lt;br /&gt;
 void main_loop(void)&lt;br /&gt;
 {&lt;br /&gt;
   ULONG signals = 0;&lt;br /&gt;
 &lt;br /&gt;
   set(Win, MUIA_Window_Open, TRUE);&lt;br /&gt;
 			 &lt;br /&gt;
   while (DoMethod(App, MUIM_Application_NewInput, &amp;amp;signals) != MUIV_Application_ReturnID_Quit)&lt;br /&gt;
   {&lt;br /&gt;
     signals = Wait(signals | SIGBREAKF_CTRL_C);&lt;br /&gt;
     if (signals &amp;amp; SIGBREAKF_CTRL_C) break;&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   set(Win, MUIA_Window_Open, FALSE);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The standard main loop has been discussed in the [[Event_Driven_Programming,_Notifications#The_Ideal_MUI_Main_Loop|previous chapter]]. The only addition is opening the window before the loop and closing it after.&lt;br /&gt;
&lt;br /&gt;
 int main(void)&lt;br /&gt;
 {&lt;br /&gt;
   App = build_gui();&lt;br /&gt;
 &lt;br /&gt;
   if (App)&lt;br /&gt;
   {&lt;br /&gt;
     notifications();&lt;br /&gt;
     main_loop();&lt;br /&gt;
     MUI_DisposeObject(App);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   return 0;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Finally, the main function of the program. It builds the object tree first and checks if it succeeded. In case of a fail, the program ends immediately. After all the objects are created, notifications are added and the program enters the main loop. When the loop finishes, the application object is disposed. It also disposes all its sub-objects.&lt;/div&gt;</summary>
		<author><name>Krashan</name></author>	</entry>

	</feed>