WXP C++ Library Version 6.74.6
Loading...
Searching...
No Matches
MetaFile.h
1#ifndef _WINC_METAFILE
2#define _WINC_METAFILE
3
4#include <WXP/Device.h>
5#include <WXP/File.h>
6#include <WXP/GeomBox.h>
7#include <WXP/Image.h>
8#include <WXP/Listener.h>
9#include <WXP/Point.h>
10#include <WXP/Points.h>
11#include <WXP/Rect.h>
12#include <WXP/String.h>
13
14namespace WXP {
15 class MetaFile : public Device, public Listener {
16 File file;
17 bool opened;
18
19 float width, height;
20 float x, y;
21 char filename[120];
22 char title[60];
23
24 GeomBox clip;
25
26 int line_color;
27 int line_style;
28 float line_width;
29
30 int text_color;
31 float text_width;
32
33 int fill_color;
34 int fill_style;
35
36 int mark_color;
37 float mark_width;
38
39 public:
40 MetaFile();
41 ~MetaFile();
42 int init();
43 int setParam( const char *str );
44 int open();
45 int getDevice( String &str );
46 int resize(float rwidth, float rheight);
47 int manage();
48 int unmanage();
49 int addCallback( const char *event, Listener *list, const void *data );
50 int doCallback( const char *ev_str, const char *ev_data );
51 void callback( const char *ev_str, const char *ev_data, const void *data );
52 int close();
53 int setFocus();
54 int unsetFocus();
55 int update();
56 int clear();
57 int clearRect( Rect &rect );
58 int setTitle(const char *str);
59 int setIcon(bool val);
60 int setFixed(bool val);
61 int setInverse(bool val);
62 bool getInverse();
63 int setBackground(const char *str);
64 int setSize(float rwidth, float rheight);
65 int getSize(float &width, float &height);
66 inline float getWidth(){ return width; };
67 inline float getHeight(){ return height; };
68 int setOffset(float rx, float ry);
69 int getOffset(float &x, float &y);
70 int getCoords( Rect &rect );
71 Rect getCoords();
72 int allocColor( float red, float grn, float blu );
73 int setColor( int type, int ind );
74 int outputColor( int color );
75 int setLineWidth( int type, float width );
76 int setLineStyle( int type, int style );
77 int setFillStyle( int type, int style );
78 int drawLine( int type, float x1, float y1, float x2, float y2 );
79 int drawLine( int type, Points &pts );
80 int drawFill( int type, Points &pts );
81 int setImageAlign( int h, int v );
82 int drawImage( Image &image, float x, float y );
83 int drawImage( Image &image, int color, float x, float y );
84 int getImage( Image &image );
85 int setFont( const char *name );
86 int setTextAlign( int h, int v );
87 int drawText( Point &pt, const char *str );
88 Rect getClip();
89 int setClip( float x1, float y1, float x2, float y2 );
90 int setClip( Rect rect );
91 int setCursor( int type );
92 int copyFrame( int dest, int src );
93 int displayFrame( int ind );
94 int clearFrame( int ind );
95 int newFrame( int ind );
96 int newFrame();
97 bool isLooping();
98 int getFrame();
99 int setFrame( int ind );
100 int deleteFrame( int ind );
101 int incFrame( int step );
102 int getNumFrames();
103 int message( const char *str );
104 int bell( int len );
105 };
106}
107#endif
This virtual class defines methods for output to generic device.
Definition: Device.h:19
This class accesses files.
Definition: File.h:15
This structure sets size and location of a geometric box.
Definition: GeomBox.h:5
This class defines an image.
Definition: Image.h:19
This virtual class defines the callback method for use with plotting.
Definition: Listener.h:11
This class outputs MetaFile graphics commands to file.
Definition: MetaFile.h:15
This class creates an array a 2D points (x, y)
Definition: Points.h:8
This is a variable length string class.
Definition: String.h:5
All WXP classes fall under the WXP namespace.
Definition: Angle.h:4
This struct sets a 3D point (x, y, z)
Definition: Point.h:5
This structure defines rectangle coordinates.
Definition: Rect.h:5