Difference between revisions of "MainWindow (Chili Framework)"

From Chilipedia
Jump to: navigation, search
Line 2: Line 2:
  
 
== Members ==
 
== Members ==
 +
 +
=== GetArgs ===
 +
 +
<code>const std::wstring& MainWindow::GetArgs() const</code><br />
 +
 +
Gets the command line arguments used to invoke the executable. This way you can tell if the user is insulting you via the prompt. <code>C:\steve's files\lemonparty>mygame.exe your mother is a whore</code>
 +
 +
=== IsActive ===
 +
 +
<code>bool MainWindow::IsActive() const</code><br />
 +
 +
Checks whether the game window is the active window (generally, the one with the input focus).
 +
 +
=== IsMinimized ===
 +
 +
<code>bool MainWindow::IsMinimized() const</code><br />
 +
 +
Checks whether the game window is in the minimized state. I can tell you what's ''not'' in a minimized state hur hur (it's my penis).
 +
 +
=== ShowMessageBox ===
 +
 +
<code>void MainWindow::ShowMessageBox( const std::wstring& title,const std::wstring& message ) const</code><br />
 +
 +
Because everybody loves popup windows. Try one with this message: "Now installing Ransom_Virus.exe..."
 +
 +
=== Kill ===
 +
 +
<code>void MainWindow::Kill()</code><br />
 +
 +
You're a funny guy, <code>MainWindow</code>. That's why I'm going to kill you last.
 +
 +
=== Member Variables ===
 +
 +
==== kbd ====
 +
<code>Keyboard MainWindow::kbd</code><br />
 +
 +
The <code>Keyboard</code> object is embedded in <code>MainWindow</code>.
 +
 +
==== mouse ====
 +
<code>Mouse MainWindow::mouse</code><br />
 +
 +
The <code>Mouse</code> object is embedded in <code>MainWindow</code>.
  
 
== See also ==
 
== See also ==
 
* The [[Chili Framework]]
 
* The [[Chili Framework]]

Revision as of 19:07, 13 July 2016

Takes care of creating the window and handling the window messages. The message handling involves piping the mouse and keyboard messages to their respective objects. In fact, MainWindow has eaten Keyboard and Mouse alive, and now they live in its belly. So you need to through MainWindow to get your input done, à la wnd.mouse.Read(). You can also use this class to figure out whether the main window is minimized or if it's out of focus, and you can kill the fat bastard with wnd.Kill().

Members

GetArgs

const std::wstring& MainWindow::GetArgs() const

Gets the command line arguments used to invoke the executable. This way you can tell if the user is insulting you via the prompt. C:\steve's files\lemonparty>mygame.exe your mother is a whore

IsActive

bool MainWindow::IsActive() const

Checks whether the game window is the active window (generally, the one with the input focus).

IsMinimized

bool MainWindow::IsMinimized() const

Checks whether the game window is in the minimized state. I can tell you what's not in a minimized state hur hur (it's my penis).

ShowMessageBox

void MainWindow::ShowMessageBox( const std::wstring& title,const std::wstring& message ) const

Because everybody loves popup windows. Try one with this message: "Now installing Ransom_Virus.exe..."

Kill

void MainWindow::Kill()

You're a funny guy, MainWindow. That's why I'm going to kill you last.

Member Variables

kbd

Keyboard MainWindow::kbd

The Keyboard object is embedded in MainWindow.

mouse

Mouse MainWindow::mouse

The Mouse object is embedded in MainWindow.

See also