Back to index

nux  3.0.0
Public Member Functions | Public Attributes
TestButton Class Reference
Inheritance diagram for TestButton:
Inheritance graph
[legend]
Collaboration diagram for TestButton:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TestButton (const char *program_name, int window_width, int window_height, int program_life_span)
 ~TestButton ()
virtual void UserInterfaceSetup ()
void ButtonClick (nux::Button *button)
void ResetEvents ()
virtual void Startup ()
virtual void Run ()
bool ReadyToGo ()
nux::WindowThreadGetWindowThread ()

Public Attributes

nux::Buttonbutton_
bool clicked_
std::string program_name_
int program_life_span_
 The program will auto-terminate after a delay in milliseconds.
nux::TimeOutSignaltimeout_signal_
nux::WindowThreadwindow_thread_
int window_width_
int window_height_

Detailed Description

Definition at line 30 of file xtest-button.cpp.


Constructor & Destructor Documentation

TestButton::TestButton ( const char *  program_name,
int  window_width,
int  window_height,
int  program_life_span 
)

Definition at line 45 of file xtest-button.cpp.

: ProgramTemplate(program_name, window_width, window_height, program_life_span)
{
  ResetEvents();
  button_ = NULL;
}

Here is the call graph for this function:

Definition at line 55 of file xtest-button.cpp.

{
  
}

Member Function Documentation

Definition at line 65 of file xtest-button.cpp.

{
  if (button_ == button)
  {
    clicked_ = true;
  }
}

Here is the caller graph for this function:

Definition at line 104 of file ProgramTemplate.cpp.

{
  return window_thread_;
}

Here is the caller graph for this function:

bool ProgramTemplate::ReadyToGo ( ) [inherited]

Definition at line 99 of file ProgramTemplate.cpp.

{
  return window_thread_;
}

Here is the caller graph for this function:

Definition at line 60 of file xtest-button.cpp.

{
  clicked_ = false;
}

Here is the caller graph for this function:

void ProgramTemplate::Run ( ) [virtual, inherited]

Definition at line 84 of file ProgramTemplate.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ProgramTemplate::Startup ( ) [virtual, inherited]

Definition at line 62 of file ProgramTemplate.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void TestButton::UserInterfaceSetup ( ) [virtual]

Reimplemented from ProgramTemplate.

Definition at line 73 of file xtest-button.cpp.

{
  nux::VLayout* main_layout = new nux::VLayout(NUX_TRACKER_LOCATION);
  button_ = new nux::Button("NUX", NUX_TRACKER_LOCATION);
  button_->SetLabelFontSize(76);

  main_layout->AddView(button_, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_MATCHCONTENT);
  main_layout->SetVerticalInternalMargin(10);
  main_layout->SetContentDistribution(nux::MAJOR_POSITION_CENTER);

  button_->click.connect(sigc::mem_fun(this, &TestButton::ButtonClick));

  static_cast<nux::WindowThread*>(window_thread_)->SetLayout(main_layout);
  
  nux::ColorLayer background(nux::Color(0xFF4D4D4D));
  static_cast<nux::WindowThread*>(window_thread_)->SetWindowBackgroundPaintLayer(&background);
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 40 of file xtest-button.cpp.

Definition at line 42 of file xtest-button.cpp.

The program will auto-terminate after a delay in milliseconds.

Definition at line 46 of file ProgramTemplate.h.

std::string ProgramTemplate::program_name_ [inherited]

Definition at line 45 of file ProgramTemplate.h.

Definition at line 47 of file ProgramTemplate.h.

Definition at line 51 of file ProgramTemplate.h.

Definition at line 48 of file ProgramTemplate.h.

Definition at line 50 of file ProgramTemplate.h.


The documentation for this class was generated from the following file: