Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

zoompanel.h

Go to the documentation of this file.
00001 #ifndef ZOOMPANEL_H
00002 #define ZOOMPANEL_H
00003 
00004 
00005 #include "guicast.h"
00006 #include "mwindow.inc"
00007 
00008 class ZoomPopup;
00009 class ZoomTumbler;
00010 
00011 #define ZOOM_PERCENTAGE 0
00012 #define ZOOM_FLOAT 1
00013 #define ZOOM_TIME 2
00014 #define ZOOM_LONG 3
00015 
00016 class ZoomHash
00017 {
00018 public:
00019         ZoomHash(double value, char *text);
00020         ~ZoomHash();
00021 
00022         double value;
00023         char *text;
00024 } ;
00025 
00026 class ZoomPanel
00027 {
00028 public:
00029         ZoomPanel(MWindow *mwindow, 
00030                 BC_WindowBase *subwindow, 
00031                 double value, 
00032                 int x, 
00033                 int y, 
00034                 int w, 
00035                 double min = 1,
00036                 double max = 131072,
00037                 int zoom_type = ZOOM_PERCENTAGE);
00038         ZoomPanel(MWindow *mwindow, 
00039                 BC_WindowBase *subwindow, 
00040                 double value, 
00041                 int x, 
00042                 int y, 
00043                 int w, 
00044                 double *user_table,
00045                 int user_size,
00046                 int zoom_type = ZOOM_PERCENTAGE);
00047         ~ZoomPanel();
00048 
00049         virtual int handle_event() { return 1; };
00050         int get_w();
00051         void calculate_menu();
00052         void update_menu();
00053         int create_objects();
00054         double get_value();
00055         char* get_text();
00056         void set_text(char *text);
00057         char* value_to_text(double value, int use_table = 1);
00058         double text_to_zoom(char *text, int use_table = 1);
00059         void update(double value);
00060         void update(char *value);
00061         void reposition_window(int x, int y);
00062 // Set images to be used
00063         void set_menu_images(VFrame **data);
00064         void set_tumbler_images(VFrame **data);
00065 
00066         MWindow *mwindow;
00067         BC_WindowBase *subwindow;
00068         int x;
00069         int y;
00070         int w;
00071         double value;
00072 
00073         ZoomPopup *zoom_text;
00074         ZoomTumbler *zoom_tumbler;
00075         char string[BCTEXTLEN];
00076         double min, max;
00077         double *user_table;
00078         int user_size;
00079         int zoom_type;
00080         ArrayList<ZoomHash*> zoom_table;
00081         VFrame **menu_images;
00082         VFrame **tumbler_images;
00083 };
00084 
00085 class ZoomPopup : public BC_PopupMenu
00086 {
00087 public:
00088         ZoomPopup(MWindow *mwindow, ZoomPanel *panel, int x, int y);
00089         ~ZoomPopup();
00090 
00091         int handle_event();
00092 
00093         ZoomPanel *panel;
00094         MWindow *mwindow;
00095 };
00096 
00097 class ZoomTumbler : public BC_Tumbler
00098 {
00099 public:
00100         ZoomTumbler(MWindow *mwindow, ZoomPanel *panel, int x, int y);
00101         ~ZoomTumbler();
00102         
00103         int handle_up_event();
00104         int handle_down_event();
00105         
00106         ZoomPanel *panel;
00107         MWindow *mwindow;
00108 };
00109 
00110 #endif 

Generated on Sun Jan 8 13:39:03 2006 for Cinelerra-svn by  doxygen 1.4.4