Message Class Reference

A Message object is a simpler version of a Dialog. It does not allow the user to make any selections -- it just presents the user with a scrolloing list of lines of test. When the user presses enter, the message goes away. More...

#include <cursorwindow.h>

Inheritance diagram for Message:
Inheritance graph
[legend]
Collaboration diagram for Message:
Collaboration graph
[legend]

List of all members.

Classes

class  Impl
 Instead of burdening the include/cursorwindow file with these messy implementation details, they are encapsulated in this nested type which is not implemented in the aforenamed header. More...

Public Types

enum  cmd_constant {
  activate,
  deactivate,
  resize
}
 

values that will be passed to the function call operator method.

More...
typedef std::list< std::string > rep_type
 actual implementation

Public Member Functions

 Message (std::string title)
 All Messages must have a title string.
void operator() (viewport *vp, int cmd)
 Handles repaints when window sizes change.
void operator+= (std::string const &s)
void popup (CursorWindow *)
 Present the message to the user and wait until he presses enter. There is no return value as the user is only allowed to acknowledge the message.
 ~Message ()
 Ah, the _destructor_. Hmmm.

Public Attributes

rep_type rep_
 container of strings that will be presented to the user. They are your strings, dork with them to your hearts content.

Private Attributes

Implimpl_
 private data not to be messedwith

Detailed Description

A Message object is a simpler version of a Dialog. It does not allow the user to make any selections -- it just presents the user with a scrolloing list of lines of test. When the user presses enter, the message goes away.

To use a Message object, do the following:

        Create your object
        then append strings to the Message using operator+= ()
        then call popup()

To append a string, use operator+=. For example:

          Message s("Error:");
      
            s += "line 1";
            s += "line 2";
      
          s.popup(window));

There is no return value.

Definition at line 1425 of file cursorwindow.h.


Member Typedef Documentation

typedef std::list<std::string> rep_type

actual implementation

Definition at line 1459 of file cursorwindow.h.


Member Enumeration Documentation

enum cmd_constant [inherited]

values that will be passed to the function call operator method.

Enumerator:
activate 

means you have been activated

deactivate 

some other viewport has taken focus

resize 

only the size has changed

Definition at line 793 of file cursorwindow.h.


Constructor & Destructor Documentation

Message ( std::string  title  ) 

All Messages must have a title string.

Definition at line 3967 of file cursorwindow.cxx.

~Message (  ) 

Ah, the _destructor_. Hmmm.

Definition at line 3981 of file cursorwindow.cxx.


Member Function Documentation

void operator() ( viewport vp,
int  cmd 
) [virtual]

Handles repaints when window sizes change.

Implements repaint_handler.

Definition at line 4337 of file cursorwindow.cxx.

Here is the call graph for this function:

void operator+= ( std::string const &  s  ) 

Append strings to rep_

Definition at line 1496 of file cursorwindow.h.

void popup ( CursorWindow w  ) 

Present the message to the user and wait until he presses enter. There is no return value as the user is only allowed to acknowledge the message.

Draw the Message list in the center of the window and let the user pick one of the entries.

Definition at line 3990 of file cursorwindow.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Impl* impl_ [private]

private data not to be messedwith

Definition at line 1465 of file cursorwindow.h.

container of strings that will be presented to the user. They are your strings, dork with them to your hearts content.

Definition at line 1470 of file cursorwindow.h.


The documentation for this class was generated from the following files:
Generated on Wed Feb 29 22:53:48 2012 for CXXUtilities by  doxygen 1.6.3