appChooser Class Reference

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

List of all members.

Public Types

enum  cmd_constant {
  activate,
  deactivate,
  resize
}
 

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

More...
typedef CursorWindow::input_event input_event
 typename alias
typedef std::list< std::string > paste_buffer_type
 The data type of the paste buffer.
typedef CursorWindow::row_col row_col
 typename alias
typedef CursorWindow::viewport viewport
 Returns true if there are unsaved edit changes in this viewer. the default return value is false. Override this function if your viewer has the ability to have unsaved edit changes -- most don't.

Public Member Functions

 appChooser (ViewerManager *vm)
string const & application_name () const
 Return a const references to a string which defines the name of the application being implemented in the viewer. This function must always return the same address and the string at that address must never change;.
void commitPasteBuffer () const
 write the paste buffer to the os clipboard.
string description () const
 Get a description of this viewer. Typically, this just returns the name of the directory or the name of the file the viewer is being applied to. However, with FTP viewers, POP3 viewers, etc this may not refer to any real file.
virtual bool fetchAllLines (std::list< std::string > &output)
 An optional method that fetches all the lines in this viewer object into a caller supplied list of strings.
void fetchPasteBuffer ()
 read the paste buffer from the os clipboard
bool handle_event (CursorWindow::input_event const *e, CursorWindow::viewport *vp)
 Handle screen repaint commands.
virtual void help ()
 Present the user with help information that is specific to this viewer's operation and contains information about system keep bindings, etc. Note that there is a default implementation of this function, but it should be overridden.
virtual bool is_dirty () const
ViewerManagermanager ()
void operator() (CursorWindow::viewport *vp, int cmd)
 Handle screen repaint commands.
void output_row_text (CursorWindow::viewport *vp, int i)
paste_buffer_typepaste_buffer ()
 Get a pointer to the viewer manager's paste buffer.
void repaint (CursorWindow::viewport *vp)
virtual void set_row_col_hint (size_t line, size_t column, bool repaint=false)
 The set_row_col_hint() method lets you specify the location where the cursor should be positioned. It is called a 'hint' because mistakes in the calling parameters are silently ignored. Also, obedience to the hint is optional. The 'repaint' parameter indicates that the screen should be immediately updated to reflect the change.

Public Attributes

bool active_
size_t cur_row_
size_t display_top_
 The appChooser is a special viewer whose only purpose is to enable the user to select type type of a new application to display in a viewport.
int first_row_

Static Public Attributes

static string app_name

Protected Attributes

ViewerManagermanager_

Detailed Description

Definition at line 742 of file viewermanager.cxx.


Member Typedef Documentation

typename alias

Definition at line 192 of file viewer.h.

typedef std::list<std::string> paste_buffer_type [inherited]

The data type of the paste buffer.

Definition at line 194 of file viewer.h.

typedef CursorWindow::row_col row_col [inherited]

typename alias

Definition at line 191 of file viewer.h.

typedef CursorWindow::viewport viewport [inherited]

Returns true if there are unsaved edit changes in this viewer. the default return value is false. Override this function if your viewer has the ability to have unsaved edit changes -- most don't.

typename alias

Definition at line 190 of file viewer.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

appChooser ( ViewerManager vm  ) 

Definition at line 765 of file viewermanager.cxx.


Member Function Documentation

string const& application_name (  )  const [virtual]

Return a const references to a string which defines the name of the application being implemented in the viewer. This function must always return the same address and the string at that address must never change;.

Implements Viewer.

Definition at line 798 of file viewermanager.cxx.

void commitPasteBuffer (  )  const [inherited]

write the paste buffer to the os clipboard.

Definition at line 625 of file viewer.cxx.

Here is the caller graph for this function:

string description (  )  const [virtual]

Get a description of this viewer. Typically, this just returns the name of the directory or the name of the file the viewer is being applied to. However, with FTP viewers, POP3 viewers, etc this may not refer to any real file.

Implements Viewer.

Definition at line 800 of file viewermanager.cxx.

bool fetchAllLines ( std::list< std::string > &  output  )  [virtual, inherited]

An optional method that fetches all the lines in this viewer object into a caller supplied list of strings.

Warning:
This is an optional feature, many viewers do not support it.
Parameters:
[out] output The location to store all the lines from this viewer.
Returns:
true to indicate that the data was extracted and false to indicate that this viewer does not support this feature.

Reimplemented in ListViewer.

Definition at line 705 of file viewer.cxx.

Here is the caller graph for this function:

void fetchPasteBuffer (  )  [inherited]

read the paste buffer from the os clipboard

Definition at line 661 of file viewer.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

bool handle_event ( CursorWindow::input_event const *  e,
CursorWindow::viewport vp 
) [virtual]

Handle screen repaint commands.

Implements Viewer.

Definition at line 1698 of file viewermanager.cxx.

Here is the call graph for this function:

void help (  )  [virtual, inherited]

Present the user with help information that is specific to this viewer's operation and contains information about system keep bindings, etc. Note that there is a default implementation of this function, but it should be overridden.

Reimplemented in ListViewer, CsvViewer, TreeViewer, TableViewer, ScriptTableViewer, TextViewer, and FTPviewer.

Definition at line 583 of file viewer.cxx.

Here is the caller graph for this function:

bool is_dirty (  )  const [virtual, inherited]

Reimplemented in TableViewer.

Definition at line 611 of file viewer.cxx.

Here is the caller graph for this function:

ViewerManager* manager (  )  [inherited]

Definition at line 126 of file viewer.h.

Here is the caller graph for this function:

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

Handle screen repaint commands.

Note:
The vp parameter gets deleted regularly, don't save it!

Implements Viewer.

Definition at line 1593 of file viewermanager.cxx.

Here is the call graph for this function:

void output_row_text ( CursorWindow::viewport vp,
int  i 
)

Definition at line 787 of file viewermanager.cxx.

Here is the caller graph for this function:

Viewer::paste_buffer_type * paste_buffer (  )  [inherited]

Get a pointer to the viewer manager's paste buffer.

Definition at line 601 of file viewer.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void repaint ( CursorWindow::viewport vp  ) 

Definition at line 782 of file viewermanager.cxx.

Here is the caller graph for this function:

virtual void set_row_col_hint ( size_t  line,
size_t  column,
bool  repaint = false 
) [virtual, inherited]

The set_row_col_hint() method lets you specify the location where the cursor should be positioned. It is called a 'hint' because mistakes in the calling parameters are silently ignored. Also, obedience to the hint is optional. The 'repaint' parameter indicates that the screen should be immediately updated to reflect the change.

Again, obedience to this function is entirely optional and most viewers will ignore it.

The line and column numbers are 0 base! Contrary to normal user's expectations, so account for this in any input calculations you make.

Definition at line 202 of file viewer.h.

Here is the caller graph for this function:


Member Data Documentation

bool active_

Definition at line 763 of file viewermanager.cxx.

string app_name [static]

Definition at line 796 of file viewermanager.cxx.

size_t cur_row_

Definition at line 761 of file viewermanager.cxx.

size_t display_top_

The appChooser is a special viewer whose only purpose is to enable the user to select type type of a new application to display in a viewport.

An 'application' of course must be derived from Viewer'. appChooser is a friend of ViewerManager because it manipulates its data structures to accomplish its task. This is generally a bad idea but in this case it makes sense. The ViewerManager uses the appChooser to fill windows when you request a split. The appChooser then prompts you for an application to run. Once you choose one, it replaces itself in the ViewerManager tables with the selected application. -- dangerous huh? That's why its a bad idea to do this in general.

Definition at line 760 of file viewermanager.cxx.

Definition at line 762 of file viewermanager.cxx.

ViewerManager* manager_ [protected, inherited]

Definition at line 117 of file viewer.h.


The documentation for this class was generated from the following file:
Generated on Wed Feb 29 22:52:33 2012 for CXXUtilities by  doxygen 1.6.3