Skip to content

Commit

Permalink
Moved some source files around into much logical locations. This shou…
Browse files Browse the repository at this point in the history
…ld also resolve a forward reference bug.
  • Loading branch information
Gary Willoughby committed May 5, 2014
1 parent 9d011e7 commit 34a22d8
Show file tree
Hide file tree
Showing 26 changed files with 988 additions and 924 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ program. Every application has at least one top level window.

| Window | Description |
| :----- | :---------- |
| [Window](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/tkdapplication.html#Window) | A window is similar to a frame except that it is created as a top level window. The primary purpose of a window is to serve as a dialog box and/or collections of widgets. |
| [Window](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/window/window.html) | A window is similar to a frame except that it is created as a top level window. The primary purpose of a window is to serve as a dialog box and/or collections of widgets. |

#### Menus

Expand Down Expand Up @@ -139,12 +139,12 @@ These are pre-built dialog boxes to gather various pieces of data from a user.

| Dialog box | Description |
| :----- | :---------- |
| [ColorDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/dialog/colordialog.html) | Pops up a dialog box for the user to select a color. |
| [DirectoryDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/dialog/directorydialog.html) | Pops up a dialog box for the user to select a directory. |
| [FontDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/dialog/fontdialog.html) | Pops up a dialog box for the user to select a font. |
| [MessageDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/dialog/messagedialog.html) | Pops up a dialog box with a user defined message and buttons. |
| [OpenFileDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/dialog/openfiledialog.html) | Pops up a dialog box for the user to open a file. |
| [SaveFileDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/dialog/savefiledialog.html) | Pops up a dialog box for the user to save a file. |
| [ColorDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/window/dialog/colordialog.html) | Pops up a dialog box for the user to select a color. |
| [DirectoryDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/window/dialog/directorydialog.html) | Pops up a dialog box for the user to select a directory. |
| [FontDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/window/dialog/fontdialog.html) | Pops up a dialog box for the user to select a font. |
| [MessageDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/window/dialog/messagedialog.html) | Pops up a dialog box with a user defined message and buttons. |
| [OpenFileDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/window/dialog/openfiledialog.html) | Pops up a dialog box for the user to open a file. |
| [SaveFileDialog](http://htmlpreview.github.io/?https://github.com/nomad-software/tkd/master/docs/tkd/window/dialog/savefiledialog.html) | Pops up a dialog box for the user to save a file. |

## Building

Expand Down
317 changes: 0 additions & 317 deletions docs/tkd/tkdapplication.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,323 +136,6 @@ <h2><a name="TkdApplication.initInterface"></a>protected abstract void <span cla
</div>
</div>
</div>
<h2><a name="Window"></a>class <span class="symbol">Window</span>: tkd.element.uielement.UiElement;
</h2>
<div class="declaration-description"><div class="sections"><p>The <span class="symbol">Window</span> class creates a new toplevel window.
</p>
<p>A window is similar to a frame except that it is created as a top-level
widget. The primary purpose of a toplevel is to serve as a container for
dialog boxes and other collections of widgets.

</p>
<p><h3>Example:</h3>
<pre><span class="keyword">auto</span> window = <span class="keyword">new</span> <span class="symbol">Window</span>(<span class="string">"New window"</span>)
.setGeometry(640, 480, 10, 10)
.setDefaultIcon(<span class="keyword">new</span> Png!(<span class="string">"icon.png"</span>))
.setMaxSize(1024, 768)
.addProtocolCommand(WindowProtocol.deleteWindow, <span class="keyword">delegate</span>(CommandArgs args){ ... });
</pre>
</p>
<p><h3>Additional Events:</h3>
Additional events that can also be bound to using the <a href="../element/uielement.html#UiElement.bind">bind</a> method.
<p> &lt;&lt;PrevWindow&gt;&gt;,
&lt;Alt-Key&gt;,
&lt;Key-Tab&gt;,
&lt;Key-F10&gt;,
</p>

</p>
<h3>See Also</h3><p><a href="./element/uielement.html">tkd.element.uielement</a></p>
</div>
<div class="class-members"><h2><a name="Window.this"></a> this(Window parent, string title, bool waitForWindow = true);
</h2>
<div class="declaration-description"><div class="sections"><p>Constructor.
</p>
<p>It's important to understand that the window will be drawn immediately
by default. This means that the window will display before any other
actions take place, including drawing or managing other widgets. This is
so other methods (such as platformId) that rely on the window being
drawn don't fail if immediately used afterwards.
<br><br>

This behaviour can be overridden by passing <strong>false</strong> as the waitForWindow
argument which is useful if you want the entire UI belonging to the new
window to be drawn before actaully showing it.
<br><br>

The parent window is responsible for the life of this window. If the
parent window is destroyed, this one will be too.

</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>Window parent</td>
<td>The window to act as a parent.</td></tr>
<tr><td>string title</td>
<td>The title of the window.</td></tr>
<tr><td>bool waitForWindow</td>
<td>Whether to wait for the window to be drawn before continuing.</td></tr>
</table>
</div>
</div>
<h2><a name="Window.this"></a> this(string title, bool waitForWindow = true);
</h2>
<div class="declaration-description"><div class="sections"><p>Constructor.
</p>
<p>It's important to understand that the window will be drawn immediately
by default. This means that the window will display before any other
actions take place, including drawing or managing other widgets. This is
so other methods (such as platformId) that rely on the window being
drawn don't fail if immediately used afterwards.
<br><br>

This behaviour can be overridden by passing <strong>false</strong> as the waitForWindow
argument which is useful if you want the entire UI belonging to the new
window to be drawn before actaully showing it.
<br><br>

If no parent is specified the new window with be a child of the main
window.

</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>string title</td>
<td>The title of the window.</td></tr>
<tr><td>bool waitForWindow</td>
<td>Whether to wait for the window to be drawn before continuing.</td></tr>
</table>
</div>
</div>
<h2><a name="Window.setTitle"></a>auto <span class="symbol">setTitle</span>(this T)(string title);
</h2>
<div class="declaration-description"><div class="sections"><p>Set the title of the window.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>string title</td>
<td>The title of the window.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.setOpacity"></a>auto <span class="symbol">setOpacity</span>(this T)(double opacity);
</h2>
<div class="declaration-description"><div class="sections"><p>Set the opacity of the window.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>double opacity</td>
<td>A number between 0.0 and 1.0 specifying the transparency.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.setFullscreen"></a>auto <span class="symbol">setFullscreen</span>(this T)(bool fullscreen);
</h2>
<div class="declaration-description"><div class="sections"><p>Handle setting the window to fullscreen.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>bool fullscreen</td>
<td>A boolean specifying if the window should be fullscreen or not.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.setTopmost"></a>auto <span class="symbol">setTopmost</span>(this T)(bool topmost);
</h2>
<div class="declaration-description"><div class="sections"><p>Handle setting the window to be the top-most. This makes the window not
able to be lowered behind any others.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>bool topmost</td>
<td>A boolean specifying if the window should be top-most or not.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.deiconify"></a>auto <span class="symbol">deiconify</span>(this T)();
</h2>
<div class="declaration-description"><div class="sections"><p>Restore the window's state to before it was minimised or withdrawn.
</p>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.iconify"></a>auto <span class="symbol">iconify</span>(this T)();
</h2>
<div class="declaration-description"><div class="sections"><p>Minimise the window.
</p>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.setGeometry"></a>auto <span class="symbol">setGeometry</span>(this T)(int width, int height, int xPos, int yPos);
</h2>
<div class="declaration-description"><div class="sections"><p>Set the size and postition of the window.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>int width</td>
<td>The width of the window.</td></tr>
<tr><td>int height</td>
<td>The height of the window.</td></tr>
<tr><td>int xPos</td>
<td>The horizontal position of the window.</td></tr>
<tr><td>int yPos</td>
<td>The vertical position of the window.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.setDefaultIcon"></a>auto <span class="symbol">setDefaultIcon</span>(this T)(Image[] images...);
</h2>
<div class="declaration-description"><div class="sections"><p>Set the default icon for this window. This is applied to all future
child windows as well.
</p>
<p>The data in the images is taken as a snapshot at the time of invocation.
If the images are later changed, this is not reflected to the titlebar
icons. Multiple images are accepted to allow different images sizes
(e.g., 16x16 and 32x32) to be provided. The window manager may scale
provided icons to an appropriate size.

</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>Image[] images</td>
<td>A variadic list of images.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.setIcon"></a>auto <span class="symbol">setIcon</span>(this T)(Image[] images...);
</h2>
<div class="declaration-description"><div class="sections"><p>Set the icon for this window, this overrides the default icon.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>Image[] images</td>
<td>A variadic list of images.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.setMaxSize"></a>auto <span class="symbol">setMaxSize</span>(this T)(int width, int height);
</h2>
<div class="declaration-description"><div class="sections"><p>Set the maximum size of the window.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>int width</td>
<td>The maximum width of the window.</td></tr>
<tr><td>int height</td>
<td>The maximum height of the window.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.setMinSize"></a>auto <span class="symbol">setMinSize</span>(this T)(int width, int height);
</h2>
<div class="declaration-description"><div class="sections"><p>Set the minimum size of the window.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>int width</td>
<td>The minimum width of the window.</td></tr>
<tr><td>int height</td>
<td>The minimum height of the window.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.addProtocolCommand"></a>auto <span class="symbol">addProtocolCommand</span>(this T)(string protocol, CommandCallback callback);
</h2>
<div class="declaration-description"><div class="sections"><p>This command is used to manage window manager protocols such as
WM_DELETE_WINDOW. Protocol is the name of an atom corresponding to a
window manager protocol, such as WM_DELETE_WINDOW or WM_SAVE_YOURSELF or
WM_TAKE_FOCUS.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>string protocol</td>
<td>The protocol to respond to.</td></tr>
<tr><td>CommandCallback callback</td>
<td>The callback to invoke when the protocol is encountered.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.

</p>
<p><h3>Callback Arguments:</h3>
These are the fields within the callback's <a href=" ./element/element.html#CommandArgs">CommandArgs</a> parameter which
are populated by this method when the callback is executed.
<p> <table class="parameter-list"> <tr><td>CommandArgs.element</td><td>The window that executed the callback.</td></tr>
<tr><td>CommandArgs.uniqueData</td><td>The protocol that was responded to.</td></tr>
<tr><td>CommandArgs.callback</td><td>The callback which was executed.</td></tr>
</table>
</p>

</p>
<h3>See Also</h3><p><a href="./element/element.html#CommandCallback">tkd.element.element.CommandCallback</a> <br>
<a href="./tkdapplication.html#WindowProtocol">tkd.tkdapplication.WindowProtocol</a> <br></p>
</div>
</div>
<h2><a name="Window.removeProtocolCommand"></a>auto <span class="symbol">removeProtocolCommand</span>(this T)(string protocol);
</h2>
<div class="declaration-description"><div class="sections"><p>Remove a previously set protocol command.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>string protocol</td>
<td>The protocol which will have the command removed.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.

</p>
<h3>See Also</h3><p><a href="./tkdapplication.html#WindowProtocol">tkd.tkdapplication.WindowProtocol</a></p>
</div>
</div>
<h2><a name="Window.setResizable"></a>auto <span class="symbol">setResizable</span>(this T)(bool resizeWidth, bool resizeHeight);
</h2>
<div class="declaration-description"><div class="sections"><p>Set if the width and height can be resized.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>bool resizeWidth</td>
<td>True to allow width resizing, <strong>false</strong> to disable.</td></tr>
<tr><td>bool resizeHeight</td>
<td>True to allow height resizing, <strong>false</strong> to disable.</td></tr>
</table>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.isAbove"></a>bool <span class="symbol">isAbove</span>(Window other);
</h2>
<div class="declaration-description"><div class="sections"><p>Determine if this window is above another.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>Window other</td>
<td>The other window to check this one is above.</td></tr>
</table>
<h3>Return Value</h3><p><strong>true</strong> if this window is above other, <strong>false</strong> if not.</p>
</div>
</div>
<h2><a name="Window.isBelow"></a>bool <span class="symbol">isBelow</span>(Window other);
</h2>
<div class="declaration-description"><div class="sections"><p>Determine if this window is below another.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>Window other</td>
<td>The other window to check this one is below.</td></tr>
</table>
<h3>Return Value</h3><p><strong>true</strong> if this window is below other, <strong>false</strong> if not.</p>
</div>
</div>
<h2><a name="Window.withdraw"></a>auto <span class="symbol">withdraw</span>(this T)();
</h2>
<div class="declaration-description"><div class="sections"><p>Withdraw a window from being displayed/mapped by the window manager.
</p>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
<h2><a name="Window.wait"></a>auto <span class="symbol">wait</span>(this T)();
</h2>
<div class="declaration-description"><div class="sections"><p>Wait until this window has been destroyed.
</p>
<h3>Return Value</h3><p>This widget to aid method chaining.</p>
</div>
</div>
</div>
</div>
<h2><a name="WindowProtocol"></a>enum <span class="symbol">WindowProtocol</span>: string;
</h2>
<div class="declaration-description"><div class="sections"><p>Window manager protocols.
</p>
<h3>Bugs</h3><p>This list is incomplete.</p>
</div>
<div class="enum-members"><h2><a name="WindowProtocol.deleteWindow"></a><span class="symbol">deleteWindow</span></h2>
<div class="declaration-description"><div class="sections"><p>Issued when the window is to be deleted.</p>
</div>
</div>
<h2><a name="WindowProtocol.saveYourself"></a><span class="symbol">saveYourself</span></h2>
<div class="declaration-description"><div class="sections"><p>Issued when the window is required to save itself.</p>
</div>
</div>
<h2><a name="WindowProtocol.takeFocus"></a><span class="symbol">takeFocus</span></h2>
<div class="declaration-description"><div class="sections"><p>Issued then the window is focused.</p>
</div>
</div>
</div>
</div>
</div>

</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
<script type="text/javascript" src="http://www.nomad.so/ddoc/javascript/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="http://www.nomad.so/ddoc/javascript/jquery.scrollTo.min.js"></script>
<script type="text/javascript" src="http://www.nomad.so/ddoc/javascript/index.js"></script>
<title>tkd.dialog.colordialog</title>
<title>tkd.window.dialog.colordialog</title>
</head>
<body>
<h1>tkd.dialog.colordialog</h1>
<!-- Generated by Ddoc from tkd/dialog/colordialog.d -->
<h1>tkd.window.dialog.colordialog</h1>
<!-- Generated by Ddoc from tkd/window/dialog/colordialog.d -->
<div class="sections"><p>Dialog module.
</p>
<h3>License</h3><p>MIT. See LICENSE for full details.</p>
</div>
<div class="module-members"><h2><a name="ColorDialog"></a>class <span class="symbol">ColorDialog</span>: tkd.dialog.dialog.Dialog;
<div class="module-members"><h2><a name="ColorDialog"></a>class <span class="symbol">ColorDialog</span>: tkd.window.dialog.dialog.Dialog;
</h2>
<div class="declaration-description"><div class="sections"><p>Pops up a dialog box for the user to select a color.
</p>
Expand Down Expand Up @@ -57,15 +57,15 @@ <h3>Parameters</h3><table class="parameter-list"><tr><td>string title</td>
<h2><a name="ColorDialog.setInitialColor"></a>auto <span class="symbol">setInitialColor</span>(this T)(string color);
</h2>
<div class="declaration-description"><div class="sections"><p>Set the initial color to display in the dialog.
Use colors from the preset color <a href="../element/color.html">list</a> or a web style hex color.
Use colors from the preset color <a href="../../element/color.html">list</a> or a web style hex color.
</p>
<h3>Parameters</h3><table class="parameter-list"><tr><td>string color</td>
<td>The initial color.</td></tr>
</table>
<h3>Return Value</h3><p>This dialog to aid method chaining.

</p>
<h3>See Also</h3><p><a href="../element/color.html">tkd.widget.color</a> <br>
<h3>See Also</h3><p><a href="../../element/color.html">tkd.widget.color</a> <br>

</p>
<p><h3>Caveats:</h3>
Expand Down
Loading

0 comments on commit 34a22d8

Please sign in to comment.