Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

OVALSLDR.H Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

OVALSLDR.H

Go to the documentation of this file.
00001 //Filename    : OVALSLDR.H
00002 //Description : Header of object ValueSlider
00003 
00004 #ifndef __VALSLDR_H
00005 #define __VALSLDR_H
00006 
00007 #include <OVGA.H>
00008 #include <OFONT.H>
00009 
00010 //--------- Define class ValueSlider --------//
00011 //
00013 class ValueSlider {
00014 public:
00015     short value_slider_x1, value_slider_y1,
00016         value_slider_x2, value_slider_y2;
00017     int format_type;
00018     int min_val, max_val;
00019     int *var_ptr;
00020     int bar_color;
00021     int bar_width;
00022     char init_flag, transparent_flag;
00023     short *value_slider_bitmap;
00024     Font *font_ptr;
00025 
00026 public:
00027     ValueSlider();
00028     ~ValueSlider();
00029     void init(int,int,int,int,int,int,int*,int=1,int=Vga::active_buf->color_up,int=1);
00030     void init_target(int,int,int,int,int,int);
00031     void set_target(int,int,int,int,int,int);
00032     void deinit();
00033     void paint();
00034     void refresh();
00035     int detect();
00036     void set_font(Font *fontPtr) { font_ptr = fontPtr; }
00037 
00038     //## chea 060999 for adding a target bar on the value slider
00039 private:
00040     int target_flat;                              //1 is on default=0
00041     int tar_x_pos;                                //x_pos of the target bar
00042     int tar_y_pos;                                //y_pos of the target bar
00043     int tar_height;                               //height of the target bar
00044     int tar_width;                                //width of the target bar
00045     int tar_borderColor;                          //border color the target bar
00046     int tar_shadowColor;                          //shadow color the target bar
00047 
00048 };
00049 
00050 //--------------------------//
00051 
00052 //--------- Define class ValueSliderGroup --------//
00053 //
00056 class ValueSliderGroup {
00057 public:
00058     int value_slider_num;
00059     ValueSlider *value_slider_array;
00060 
00061 public:
00062     ValueSliderGroup(int);
00063     ~ValueSliderGroup()           { delete [] value_slider_array; }
00064     void paint();
00065     int detect();
00066     ValueSlider& operator[](int recNo)  { if (recNo>value_slider_num) recNo=0; return value_slider_array[recNo]; }
00067 };
00068 
00069 //--------------------------//
00070 #endif

Generated on Fri Aug 23 01:38:32 2002 for VirtualU by doxygen1.2.17