Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

CFractalViewerApp Class Reference

The MFC application class. More...

#include <FractalViewer.h>

List of all members.

Public Methods

 CFractalViewerApp ()
FractalImageinq_image (void)
void image_resized (void)
 This is called when the FractalImage has been resized.

void restart (void)
 This is called when a change is made to the FractalImage.

void update_status_bar (void)
 Updates the status bar to show the current view.

void set_processor (int fractal_type)
 Sets the fractal type to that given.

virtual BOOL InitInstance ()
virtual BOOL OnIdle (LONG lCount)
afx_msg void OnAppAbout ()
afx_msg void OnViewOptions ()
afx_msg void OnPaletteRandomise ()
afx_msg void OnViewFractals ()
afx_msg void OnPaletteMainCol ()
afx_msg void OnPaletteBright ()
afx_msg void OnPalettePastel ()
afx_msg void OnPaletteMonochrome ()
afx_msg void OnPaletteWhite ()
afx_msg void OnUpdatePaletteBright (CCmdUI *pCmdUI)
afx_msg void OnUpdatePalettePastel (CCmdUI *pCmdUI)
afx_msg void OnUpdatePaletteMonochrome (CCmdUI *pCmdUI)
afx_msg void OnUpdatePaletteWhite (CCmdUI *pCmdUI)
afx_msg void OnExportJpg ()

Private Methods

void set_imagegen (void)
 Sets 'm_imagegen' to point to either 'm_progressive_imagegen' or 'm_fast_imagegen', depending on the value of 'm_progressive'.

void update_palette (void)
 Updates the palette, regenerating the colours it contains.

void export_image (CString path, int width, int height, int aa_gridsize)
 Creates an image of the given size, and saves it to the given path.


Private Attributes

FractalImage m_image
 The FractalImage being calculated.

bool m_progressive
 If true, ProgressiveImageGen is used as the image generator.

ImageGenm_imagegen
 Points to the current image generator.

ProgressiveImageGen m_progressive_imagegen
 ProgressiveImageGen is used when image is being generated progressively.

FastImageGen m_fast_imagegen
 FastImageGen is used when the image is being generated non-progressively.

AAFractalImage m_aa_image
 Anti-aliasing uses an AAFractalImage.

Palette m_palette
 Palette for colouring image.

int m_fractal_type
 Fractal type - indicates which of the derived Processor objects is set in 'm_image'.

int m_progress
 Currently displayed iteration - this is used to determine when to update the status bar.


Detailed Description

The MFC application class.

This stores all the application state data.


Constructor & Destructor Documentation

CFractalViewerApp::CFractalViewerApp  
 


Member Function Documentation

void CFractalViewerApp::export_image CString    path,
int    width,
int    height,
int    aa_gridsize
[private]
 

Creates an image of the given size, and saves it to the given path.

void CFractalViewerApp::image_resized void   
 

This is called when the FractalImage has been resized.

The ProgressiveFractalImage is re-initialised.

BOOL CFractalViewerApp::InitInstance   [virtual]
 

FractalImage* CFractalViewerApp::inq_image void    [inline]
 

void CFractalViewerApp::OnAppAbout  
 

void CFractalViewerApp::OnExportJpg  
 

BOOL CFractalViewerApp::OnIdle LONG    lCount [virtual]
 

void CFractalViewerApp::OnPaletteBright  
 

void CFractalViewerApp::OnPaletteMainCol  
 

void CFractalViewerApp::OnPaletteMonochrome  
 

void CFractalViewerApp::OnPalettePastel  
 

void CFractalViewerApp::OnPaletteRandomise  
 

void CFractalViewerApp::OnPaletteWhite  
 

void CFractalViewerApp::OnUpdatePaletteBright CCmdUI *    pCmdUI
 

void CFractalViewerApp::OnUpdatePaletteMonochrome CCmdUI *    pCmdUI
 

void CFractalViewerApp::OnUpdatePalettePastel CCmdUI *    pCmdUI
 

void CFractalViewerApp::OnUpdatePaletteWhite CCmdUI *    pCmdUI
 

void CFractalViewerApp::OnViewFractals  
 

void CFractalViewerApp::OnViewOptions  
 

void CFractalViewerApp::restart void   
 

This is called when a change is made to the FractalImage.

The ProgressiveFractalImage is restarted.

void CFractalViewerApp::set_imagegen void    [private]
 

Sets 'm_imagegen' to point to either 'm_progressive_imagegen' or 'm_fast_imagegen', depending on the value of 'm_progressive'.

void CFractalViewerApp::set_processor int    fractal_type
 

Sets the fractal type to that given.

The different fractal types are implemented by different derived Processor classes.

void CFractalViewerApp::update_palette void    [private]
 

Updates the palette, regenerating the colours it contains.

This is called to re-randomise the colours in the palette, or if the type is changed.

void CFractalViewerApp::update_status_bar void   
 

Updates the status bar to show the current view.

This should be called whenever the view has been changed.


Member Data Documentation

AAFractalImage CFractalViewerApp::m_aa_image [private]
 

Anti-aliasing uses an AAFractalImage.

FastImageGen CFractalViewerApp::m_fast_imagegen [private]
 

FastImageGen is used when the image is being generated non-progressively.

int CFractalViewerApp::m_fractal_type [private]
 

Fractal type - indicates which of the derived Processor objects is set in 'm_image'.

The values of this must match the values entered in the fractal type combo control on the Fractals panel. 0 - MandelbrotProcessor 1 - InvMandelbrotProcessor 2 - Z3Processor 3 - InvZ3Processor 4 - Z2PlusZProcessor 5 - InvZ2PlusZProcessor

FractalImage CFractalViewerApp::m_image [private]
 

The FractalImage being calculated.

ImageGen* CFractalViewerApp::m_imagegen [private]
 

Points to the current image generator.

Palette CFractalViewerApp::m_palette [private]
 

Palette for colouring image.

int CFractalViewerApp::m_progress [private]
 

Currently displayed iteration - this is used to determine when to update the status bar.

bool CFractalViewerApp::m_progressive [private]
 

If true, ProgressiveImageGen is used as the image generator.

Otherwise, FastImageGen is used.

ProgressiveImageGen CFractalViewerApp::m_progressive_imagegen [private]
 

ProgressiveImageGen is used when image is being generated progressively.


The documentation for this class was generated from the following files:
Generated on Sun Jul 21 11:52:16 2002 for FractalViewer by doxygen1.2.16