Back to index

nux  3.0.0
Functions | Variables
test_empty_window.cpp File Reference
#include "Nux/Nux.h"
#include "Nux/WindowThread.h"

Go to the source code of this file.

Functions

void TimeOutCallback (void *data)
void UserInterfaceInitialization (nux::NThread *thread, void *init_data)
int main (int argc, char **argv)

Variables

nux::TimeOutSignaltimeout_signal = NULL

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 43 of file test_empty_window.cpp.

{
  // Initialize Nux subsystem
  nux::NuxInitialize (0);

  // Create a Window thread
  nux::WindowThread* wt = nux::CreateGUIThread(
    TEXT("Empty Window Test"),
    300,
    200,
    0,
    &UserInterfaceInitialization,
    0);

  // // Start the main loop
  wt->Run (0);

  delete wt;
  return 0;
}

Here is the call graph for this function:

void TimeOutCallback ( void *  data)

Definition at line 26 of file test_empty_window.cpp.

{
  nux::WindowThread *thread = static_cast<nux::WindowThread*>(data);
  thread->ExitMainLoop();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void UserInterfaceInitialization ( nux::NThread thread,
void *  init_data 
)

Definition at line 32 of file test_empty_window.cpp.

{
 
  nux::ColorLayer background(nux::Color(0xFF4D4D4D));
  static_cast<nux::WindowThread*>(thread)->SetWindowBackgroundPaintLayer(&background);

  timeout_signal = new nux::TimeOutSignal();
  timeout_signal->time_expires.connect(sigc::ptr_fun(TimeOutCallback));
  static_cast<nux::WindowThread*>(thread)->GetTimerHandler().AddTimerHandler(1000, timeout_signal, thread, NULL);
}

Here is the call graph for this function:


Variable Documentation

Definition at line 24 of file test_empty_window.cpp.