#include <Obutton.h>
List of all members.
Definition at line 29 of file Obutton.h.
Definition at line 31 of file Obutton.h.
Definition at line 18 of file Obutton.cpp.
References NULL.
Definition at line 55 of file Obutton.cpp.
References deinit().
Syntax : create(<int>,<int>,<int>,<int>,<int>,<int>,<char>)
<int> buttonType = BUTTON_TEXT (1) - text button, BUTTON_BITMAP (2) - icon button <int> x1, y1 = coordination of the button <int> x2, y2 = coordination of the button <void*> bodyPtr = text or icon pointer or pointer to user defined function, depended on the type of the button allow NULL icon pointer, which no icon will be displayed [int] elastic = Whether the button is elastic Elastic button will pop up immediately when button release Non-elastic button will remain pushed until pop() is called (default : 1)
[int] defIsPushed = default is_pushed : 1-Pushed, 0-Non-pushed (default : 0)
Note : it use the color setting in (vga) and (font_san)
Definition at line 168 of file Obutton.cpp.
References Vga::active_buf, BUTTON_TEXT, and NULL.
Referenced by create_bitmap(), create_bitmapW(), create_text(), create_udf(), paint_bitmap(), paint_bitmapW(), paint_text(), and paint_udf().
[inline]
Definition at line 80 of file Obutton.h.
References BUTTON_BITMAP, create(), elastic, x1, x2, y1, and y2.
Definition at line 87 of file Obutton.h.
References BUTTON_BITMAPW, create(), elastic, x1, x2, y1, and y2.
Given only the top left position of the button, it will calculate the width and height of the button based on the given text and current button font.
<int> x1, y1 = coordination of the button <char*> textPtr = text pointer, depended on the type of the button
[int] elastic = Whether the button is elastic Elastic button will pop up immediately when button release Non-elastic button will remain pushed until pop() is called (default : 1)
Definition at line 104 of file Obutton.cpp.
References BUTTON_TEXT.
Definition at line 68 of file Obutton.h.
References BUTTON_TEXT, create(), elastic, x1, x2, y1, and y2.
Referenced by BlackBoard::black_log_report(), Letter::eval_letter_report(), GameSetting::new_game_report(), GameSetting::play_scenario_report(), Finance::report_paint_button(), Optimization::report_stage_1(), Optimization::report_stage_2(), Letter::scen_welcome_letter_report(), Sys::setting_report(), FacultyRes::summary_report_5(), and Letter::welcome_letter_report().
Definition at line 96 of file Obutton.h.
References BUTTON_UDF, ButtonFP, create(), elastic, x1, x2, y1, and y2.
Definition at line 40 of file Obutton.cpp.
References mem_del, and NULL.
Referenced by ButtonGroup::deinit_buttons(), free_button_memory(), Finance::report_deinit(), Sys::setting_report_deinit(), FacultyRes::summary_report_deinit(), and ~Button().
Detect whether the button has been pressed, if so, act correspondly. Check for left mouse button only
[unsigned] keyCode1 = if the specified key is pressed, emulate button pressed (default : 0)
[unsigned] keyCode2 = if the specified key is pressed, emulate button pressed (default : 0)
[int] detectRight = whether also detect the right button or not (default : 0)
[int] suspendPop = don't pop up the button even it should (defalut : 0)
Return : 1 - if left mouse button pressed 2 - if right mouse button pressed 3 - the key is pressed (only when keyCode is specified) 0 - if not
Definition at line 406 of file Obutton.cpp.
References LEFT_BUTTON, and RIGHT_BUTTON.
Referenced by BlackBoard::black_log_detect(), Letter::eval_letter_detect(), Finance::report_detect(), Letter::scen_welcome_letter_detect(), Sys::setting_report_detect(), and Letter::welcome_letter_detect().
Definition at line 114 of file Obutton.h.
References enable_flag, and paint().
Referenced by Letter::eval_letter_report(), and Letter::welcome_letter_report().
Definition at line 119 of file Obutton.h.
Hide and disable the button
Syntax : hide(char)
<char> backColor = background color
Definition at line 241 of file Obutton.cpp.
References Vga::active_buf.
[int] defIsPushed = default is_pushed : 1-Pushed, 0-Non-pushed (default : is_pushed)
[int] repaintBody = repaint the button body or only repaint panel sides (default : 1), 0 when called by detect()
Definition at line 275 of file Obutton.cpp.
References Vga::active_buf, and V_WHITE.
Referenced by BlackBoard::black_log_report(), disable(), enable(), Letter::eval_letter_report(), GameSetting::new_game_report(), paint_bitmap(), paint_bitmapW(), paint_text(), paint_udf(), GameSetting::play_scenario_report(), pop(), push(), Finance::report_paint_button(), Sys::setting_report(), FacultyRes::summary_report_5(), and Letter::welcome_letter_report().
Definition at line 83 of file Obutton.h.
References BUTTON_BITMAP, create(), elastic, paint(), x1, x2, y1, and y2.
Definition at line 90 of file Obutton.h.
References BUTTON_BITMAPW, create(), elastic, paint(), x1, x2, y1, and y2.
Definition at line 136 of file Obutton.cpp.
Definition at line 71 of file Obutton.h.
References BUTTON_TEXT, create(), elastic, paint(), x1, x2, y1, and y2.
Definition at line 99 of file Obutton.h.
References BUTTON_UDF, ButtonFP, create(), elastic, paint(), x1, x2, y1, and y2.
Definition at line 112 of file Obutton.h.
References paint().
Referenced by Sys::setting_report(), and Sys::setting_report_detect().
Definition at line 111 of file Obutton.h.
References is_pushed, and paint().
Definition at line 59 of file Obutton.h.
References init_flag.
<void*> bodyPtr = text or icon pointer or pointer to user defined function,
Definition at line 217 of file Obutton.cpp.
References BUTTON_TEXT, and NULL.
Set the font of the button, if not set, default use font_san.
<Font*> fontPtr = pointer to the font
Definition at line 77 of file Obutton.cpp.
Definition at line 63 of file Obutton.cpp.
Definition at line 61 of file Obutton.h.
References button_key.
Show a button hiden by hide().
Definition at line 258 of file Obutton.cpp.
Definition at line 57 of file Obutton.h.
References use_texture_flag.
Wait for user to press the button
[int] timeOut - 1=enable inactive timeout 0=disable inactive timeout (default : 1 )
Definition at line 498 of file Obutton.cpp.
References KEY_ESC, and KEY_RETURN.
Definition at line 44 of file Obutton.h.
Definition at line 47 of file Obutton.h.
Definition at line 49 of file Obutton.h.
Definition at line 40 of file Obutton.h.
Referenced by set_key().
Definition at line 38 of file Obutton.h.
Definition at line 48 of file Obutton.h.
Definition at line 45 of file Obutton.h.
Definition at line 34 of file Obutton.h.
Referenced by disable(), and enable().
Definition at line 46 of file Obutton.h.
Definition at line 50 of file Obutton.h.
Definition at line 37 of file Obutton.h.
Referenced by reset().
Definition at line 33 of file Obutton.h.
Referenced by push().
Definition at line 41 of file Obutton.h.
Definition at line 43 of file Obutton.h.
Definition at line 39 of file Obutton.h.
Referenced by use_texture().
Definition at line 35 of file Obutton.h.