DocWnd Class Reference

#include <docwnd.h>

Inheritance diagram for DocWnd:

Document List of all members.

Public Member Functions

 DocWnd (Image *img)
virtual ~DocWnd ()
bool save ()
bool saveAs ()
bool tryClose ()
void undo ()
void redo ()
void unSelect ()
void filterGray ()
void filterInvert ()
void applyPlugin (std::string plugin, const char *szArgs=0)
void macLoad ()
void macCreate (const char *szName)
void applyMacro (std::string macroName)
void setStatusMsg (const char *szMsg)
void setStatusMsg (const std::string &msg)
virtual void redraw ()
void drawStatus ()

Detailed Description

Document window class.

Definition at line 32 of file docwnd.h.


Constructor & Destructor Documentation

DocWnd::DocWnd ( Image img  ) 

Create Document window. This does not mean that window is shown. Use Fl_Window::show() method to do this.

Parameters:
img Pointer to Image object to work with.

virtual DocWnd::~DocWnd (  )  [virtual]

Virtual destructor is needed for collaboration with Document class.


Member Function Documentation

bool DocWnd::save (  ) 

Save current image. Image will have the same name if already has one.

Returns:
Return true if really saved. Saving can be also canceled by user. See program documentation for more information.

bool DocWnd::saveAs (  ) 

Save current image with new name. User will be prompted for new name.

Returns:
Return true if really saved. Saving can be also canceled by user. See program documentation for more information.

bool DocWnd::tryClose (  ) 

Close current document window. User will be asked for saving current document if document was changed since last saving.

Returns:
Return true if really closed. Closing can be also canceled by user. See program documentation for more information.

void DocWnd::undo (  ) 

Undo last change. This can throw CmdHistory::ErrUnderflow exception. See CmdHistory documentation for more information.

void DocWnd::redo (  ) 

Undo last undo. This can throw CmdHistory::ErrUnderflow exception. See CmdHistory documentation for more information.

void DocWnd::unSelect (  ) 

Set selected area to whole image.

void DocWnd::filterGray (  ) 

Apply filter "grayscale"

void DocWnd::filterInvert (  ) 

Apply filter "invert"

void DocWnd::applyPlugin ( std::string  plugin,
const char *  szArgs = 0 
)

Apply plugin to current image.

Parameters:
plugin Plugin name (identification)
szArgs Arguments passed to plugin

void DocWnd::macLoad (  ) 

Start macro loading

void DocWnd::macCreate ( const char *  szName  ) 

Stop macro loading and create new macro. This macro is immediately saved to configuration file.

Parameters:
szName New macro name. Macro is overwrited whithout prompt if already exist.

void DocWnd::applyMacro ( std::string  macroName  ) 

Apply macro on current image.

Parameters:
macroName Name of macro to apply.

void DocWnd::setStatusMsg ( const char *  szMsg  ) 

Set status bar text. Call DocWnd::redraw() method to apply this change.

Parameters:
szMsg New text to view in status bar.

Referenced by setStatusMsg().

void DocWnd::setStatusMsg ( const std::string &  msg  )  [inline]

Set status bar text. Call DocWnd::redraw() method to apply this change.

Parameters:
msg New text to view in status bar.

Definition at line 129 of file docwnd.h.

References setStatusMsg().

virtual void DocWnd::redraw (  )  [virtual]

Redraw document window

void DocWnd::drawStatus (  ) 

Low level draw of status bar. Do not use since you really know what you are doing.


The documentation for this class was generated from the following file:
Generated on Wed Aug 29 00:01:04 2007 for GED 2006 by  doxygen 1.5.2