<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.bci2000.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Programming_Reference%3AApplicationWindowClient_Class</id>
	<title>Programming Reference:ApplicationWindowClient Class - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.bci2000.org/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Programming_Reference%3AApplicationWindowClient_Class"/>
	<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Programming_Reference:ApplicationWindowClient_Class&amp;action=history"/>
	<updated>2026-06-23T06:11:59Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.bci2000.org/mediawiki/index.php?title=Programming_Reference:ApplicationWindowClient_Class&amp;diff=6240&amp;oldid=prev</id>
		<title>Mellinger at 12:23, 23 August 2011</title>
		<link rel="alternate" type="text/html" href="https://www.bci2000.org/mediawiki/index.php?title=Programming_Reference:ApplicationWindowClient_Class&amp;diff=6240&amp;oldid=prev"/>
		<updated>2011-08-23T12:23:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;ApplicationWindowClient&amp;#039;&amp;#039; is a mix-in class that provides its inheritants with access to application windows,  which are instances of [[Programming Reference:ApplicationWindow Class|the &amp;lt;tt&amp;gt;ApplicationWindow&amp;lt;/tt&amp;gt; class]]. &amp;lt;tt&amp;gt;ApplicationWindow&amp;lt;/tt&amp;gt; instances have names, with the default name being &amp;quot;Application&amp;quot;. A window&amp;#039;s name may be used to obtain a [[Programming Reference:DisplayWindow Class|&amp;lt;tt&amp;gt;DisplayWindow&amp;lt;/tt&amp;gt;]] reference to the window, e.g.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DisplayWindow&amp;amp; applicationWindow = Window( &amp;quot;Application&amp;quot; );&lt;br /&gt;
applicationWindow.SetTop( 15 );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Const access to the underlying list of windows is provided via the &amp;lt;tt&amp;gt;ApplicationWindowClient::Windows&amp;lt;/tt&amp;gt; pointer. This allows to write&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if( Windows-&amp;gt;Exists( &amp;quot;Application&amp;quot; ) )&lt;br /&gt;
{&lt;br /&gt;
  DisplayWindow&amp;amp; applicationWindow = Window( &amp;quot;Application&amp;quot; );&lt;br /&gt;
  TextStimulus* pStimulus = new TextStimulus( applicationWindow );&lt;br /&gt;
  ..&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It also allows to iterate over existing windows:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for( int i = 0; i &amp;lt; Windows-&amp;gt;Size(); ++i )&lt;br /&gt;
{&lt;br /&gt;
  bciout &amp;lt;&amp;lt; ( *Windows )[i].Name() &amp;lt;&amp;lt; endl;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;ApplicationWindow&amp;lt;/tt&amp;gt; instances are created by using the &amp;lt;tt&amp;gt;ApplicationWindowClient::Window( name )&amp;lt;/tt&amp;gt; function during a module&amp;#039;s construction phase, typically from a &amp;lt;tt&amp;gt;GenericFilter&amp;lt;/tt&amp;gt; descendant&amp;#039;s constructor (for an example, see  [[Programming Reference:ApplicationWindow Class#Usage|the &amp;lt;tt&amp;gt;ApplicationWindow&amp;lt;/tt&amp;gt; class page]]. If an application window with that name already exists, it will be shared amongst filters which access it.&lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t want to create an application window, but only access an existing one, you need to declare access to that window during the preflight phase. In your &amp;lt;tt&amp;gt;Preflight()&amp;lt;/tt&amp;gt; member function, write:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Window( &amp;quot;Application&amp;quot; );&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
When no such window exists, a preflight error will be reported. Unless the window has been accessed during the construction phase, not declaring access to the window during the preflight phase will result in an error message when calling &amp;lt;tt&amp;gt;ApplicationWindowClient::Window()&amp;lt;/tt&amp;gt; from elsewhere.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
[[Programming Reference:ApplicationWindow Class]], [[Programming Reference:Environment Class]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Framework API]][[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Mellinger</name></author>
	</entry>
</feed>