FileSelector Class Reference

#include <cursorwindow.h>

Inheritance diagram for FileSelector:
Inheritance graph
[legend]
Collaboration diagram for FileSelector:
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...

Public Member Functions

 FileSelector (std::string const &title, std::string const &filenamePattern, std::string const &startFileName)
 Create a file sector dialog which is not yet popped up. Use the popup() method to display it and let the user interact.
void operator() (viewport *vp, int cmd)
 Handles repaints when window sizes change.
std::string popup (CursorWindow *window, Viewer *parent)
 Present the user with dialog box that lets him select a file or directory from a list of files. The user can navigate up and down in the list, move up a directory, down a directory, or jump to another directory.

Private Member Functions

void adaptToWindow (viewport *)
void eraseMe (CursorWindow *w)
std::string handleInput (CursorWindow *w, Viewer *parent)
void paintDialogBackground (viewport *)
void paintRow (CursorWindow *w, int displayAreaRow)
void readFileInfo ()

Private Attributes

int col_
int dialogHeight_
int dialogWidth_
int displayAreaCol_
int displayAreaHeight_
int displayAreaRow_
int displayAreaWidth_
int inputIndex_
int inputTopIndex_
size_t maxNameWidth_
bool noRepaint_
int row_
std::vector< std::string > rowText_
std::string searchDir_
std::string searchPattern_
std::string startFile_
std::string title_

Detailed Description

Definition at line 1508 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

FileSelector ( std::string const &  title,
std::string const &  filenamePattern,
std::string const &  startFileName 
)

Create a file sector dialog which is not yet popped up. Use the popup() method to display it and let the user interact.

Parameters:
title The title of the dialog
filenamePattern The "dir/*" string to prime the pump for the user.
startFileName Optional string meaning that when the user first gets input, try to make sure that the cursor is sitting on the startFileName

Definition at line 4392 of file cursorwindow.cxx.


Member Function Documentation

void adaptToWindow ( viewport v  )  [private]

Definition at line 4442 of file cursorwindow.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void eraseMe ( CursorWindow w  )  [private]

Definition at line 5139 of file cursorwindow.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string handleInput ( CursorWindow w,
Viewer parent 
) [private]

Definition at line 4611 of file cursorwindow.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Handles repaints when window sizes change.

Implements repaint_handler.

Definition at line 4406 of file cursorwindow.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void paintDialogBackground ( viewport v  )  [private]

Definition at line 4485 of file cursorwindow.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void paintRow ( CursorWindow w,
int  displayAreaRow 
) [private]

Definition at line 4588 of file cursorwindow.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string popup ( CursorWindow window,
Viewer parent 
)

Present the user with dialog box that lets him select a file or directory from a list of files. The user can navigate up and down in the list, move up a directory, down a directory, or jump to another directory.

Returns:
The function returns empty string to indicate that the user aborted.
Parameters:
window The parent window
parent The parent viewer

Definition at line 5127 of file cursorwindow.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void readFileInfo (  )  [private]

Definition at line 4502 of file cursorwindow.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

int col_ [private]

Definition at line 1564 of file cursorwindow.h.

int dialogHeight_ [private]

Definition at line 1565 of file cursorwindow.h.

int dialogWidth_ [private]

Definition at line 1566 of file cursorwindow.h.

int displayAreaCol_ [private]

Definition at line 1570 of file cursorwindow.h.

int displayAreaHeight_ [private]

Definition at line 1571 of file cursorwindow.h.

int displayAreaRow_ [private]

Definition at line 1569 of file cursorwindow.h.

int displayAreaWidth_ [private]

Definition at line 1572 of file cursorwindow.h.

int inputIndex_ [private]

Definition at line 1574 of file cursorwindow.h.

int inputTopIndex_ [private]

Definition at line 1575 of file cursorwindow.h.

size_t maxNameWidth_ [private]

Definition at line 1561 of file cursorwindow.h.

bool noRepaint_ [private]

Definition at line 1577 of file cursorwindow.h.

int row_ [private]

Definition at line 1563 of file cursorwindow.h.

std::vector<std::string> rowText_ [private]

Definition at line 1560 of file cursorwindow.h.

std::string searchDir_ [private]

Definition at line 1557 of file cursorwindow.h.

std::string searchPattern_ [private]

Definition at line 1556 of file cursorwindow.h.

std::string startFile_ [private]

Definition at line 1558 of file cursorwindow.h.

std::string title_ [private]

Definition at line 1555 of file cursorwindow.h.


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