Canola  0.8.D001
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
program_card_functor_image Class Reference

#include <image.h>

Inheritance diagram for program_card_functor_image:
program_card_functor program_card_functor_image_pdf program_card_functor_image_pixbuf program_card_functor_image_png program_card_functor_image_ps program_card_functor_image_svg

List of all members.

Public Types

typedef boost::shared_ptr
< program_card_functor_image
pointer

Public Member Functions

virtual ~program_card_functor_image ()
void set_disassemble (bool value)

Static Public Member Functions

static pointer factory (const std::string &filename)

Protected Member Functions

 program_card_functor_image ()
void draw (const Cairo::RefPtr< Cairo::Context > &cr, const unsigned char *data, size_t data_size)
void draw_envelope (const Cairo::RefPtr< Cairo::Context > &cr)
void set_position (int card_num, int card_count)
void set_title (const std::string &text)
void set_arrow (bool value)
void set_color (const std::string &text)
void set_perforations (bool value)
void set_trim_corners (bool value)
void set_style (const std::string &text)
virtual void set_sfj_list (const std::string &text)
virtual void set_fj_list (const std::string &text)
virtual void set_memory_list (const std::string &text)
virtual void set_steps (int value)

Private Types

enum  style_t { style_aus, style_ibm, style_blank }

Private Member Functions

void outline (const Cairo::RefPtr< Cairo::Context > &cr)
 program_card_functor_image (const program_card_functor_image &rhs)
program_card_functor_imageoperator= (const program_card_functor_image &rhs)

Private Attributes

bool trim_corners
bool perforations
bool disassemble
bool arrow
int card_num
int card_count
std::string color
std::string title
style_t style
std::string sfj_list
unsigned accuracy
unsigned step_count
std::string fj_list
std::string memory_list

Detailed Description

The program_card_functor class is used to represent the processing required to draw Canola 1614P program card images.

Definition at line 29 of file image.h.


Member Typedef Documentation

Definition at line 33 of file image.h.


Member Enumeration Documentation

Enumerator:
style_aus 
style_ibm 
style_blank 

Definition at line 155 of file image.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 28 of file image.cc.

The default constructor. For use by derived classes only.

Definition at line 33 of file image.cc.

The copy constructor. Do not use.

Parameters:
rhsThe right hand side of the initialization.

Member Function Documentation

void program_card_functor_image::draw ( const Cairo::RefPtr< Cairo::Context > &  cr,
const unsigned char *  data,
size_t  data_size 
) [protected]

The draw method is used to draw an image of a program card into the given drawing context. Because Cairo has numerous drawing surfaces, this allows card images to be PNG file, or post script, or Gtk windows, etc.

Parameters:
crThe cairo graphics context to draw on.
dataThe program data to be drawn on the card image
data_sizeThe length of the program to be drawn.

Definition at line 104 of file image.cc.

void program_card_functor_image::draw_envelope ( const Cairo::RefPtr< Cairo::Context > &  cr) [protected]

The draw_envelope method is used to draw an image of a card envelope, for keeping your cards sets in.

Parameters:
crThe cairo graphics context to draw on.

Definition at line 520 of file image.cc.

The factory class method is used to create a functor suitable for use drawing images of programs cards. The file extension of the filename is examplined, for things like ".png" or ".pdf", etc.

Parameters:
filenamethe name of the file to be written.
Returns:
A managed pointer to a suitable instance. If it doesn't recognise the file extension, it issues a fatal error and exits.

Definition at line 44 of file factory.cc.

program_card_functor_image& program_card_functor_image::operator= ( const program_card_functor_image rhs) [private]

The assignment operator. Do not use.

Parameters:
rhsThe right hand side of the assignment.
void program_card_functor_image::outline ( const Cairo::RefPtr< Cairo::Context > &  cr) [private]

Definition at line 82 of file image.cc.

void program_card_functor_image::set_arrow ( bool  value) [protected, virtual]

Reimplemented from program_card_functor.

Definition at line 452 of file image.cc.

void program_card_functor_image::set_color ( const std::string &  text) [protected, virtual]

Reimplemented from program_card_functor.

Definition at line 459 of file image.cc.

void program_card_functor_image::set_disassemble ( bool  value) [virtual]

Reimplemented from program_card_functor.

Definition at line 466 of file image.cc.

void program_card_functor_image::set_fj_list ( const std::string &  text) [protected, virtual]

Reimplemented from program_card_functor.

Definition at line 651 of file image.cc.

void program_card_functor_image::set_memory_list ( const std::string &  text) [protected, virtual]

Reimplemented from program_card_functor.

Definition at line 658 of file image.cc.

void program_card_functor_image::set_perforations ( bool  value) [protected, virtual]

Reimplemented from program_card_functor.

Definition at line 473 of file image.cc.

void program_card_functor_image::set_position ( int  card_num,
int  card_count 
) [protected]

Definition at line 49 of file image.cc.

void program_card_functor_image::set_sfj_list ( const std::string &  text) [protected, virtual]

Reimplemented from program_card_functor.

Definition at line 644 of file image.cc.

void program_card_functor_image::set_steps ( int  value) [protected, virtual]

Reimplemented from program_card_functor.

Definition at line 665 of file image.cc.

void program_card_functor_image::set_style ( const std::string &  text) [protected, virtual]

Reimplemented from program_card_functor.

Definition at line 487 of file image.cc.

void program_card_functor_image::set_title ( const std::string &  text) [protected, virtual]

Reimplemented from program_card_functor.

Definition at line 445 of file image.cc.

void program_card_functor_image::set_trim_corners ( bool  value) [protected, virtual]

Reimplemented from program_card_functor.

Definition at line 480 of file image.cc.


Member Data Documentation

Definition at line 165 of file image.h.

The arrow instance variable is used to remember whether or not to draw a directional arrow on the card.

Definition at line 145 of file image.h.

Definition at line 149 of file image.h.

Definition at line 147 of file image.h.

std::string program_card_functor_image::color [private]

Definition at line 151 of file image.h.

The disassemble instance variable is used to remember whether or not to disassemble the opcode down the right hand side of the card.

Definition at line 139 of file image.h.

std::string program_card_functor_image::fj_list [private]

Definition at line 167 of file image.h.

Definition at line 168 of file image.h.

The perforations instance variable is used to remember whether or not the bits that are not holes should have perforations drawn in their place.

Definition at line 132 of file image.h.

std::string program_card_functor_image::sfj_list [private]

Definition at line 164 of file image.h.

Definition at line 166 of file image.h.

Definition at line 162 of file image.h.

std::string program_card_functor_image::title [private]

Definition at line 153 of file image.h.

The trim_corners instance variable is used to remember whether or not the leading corners are to be trimmed.

Definition at line 125 of file image.h.


The documentation for this class was generated from the following files: