#include <group.h>
Inheritance diagram for Group:

Public Methods | |
| Group () | |
| Group (int, int) | |
| ~Group () | |
| void | Add (CheckBox *, int, int) |
| Message | Dispatch (Message &) |
| void | Init (Display *d, int x, int y) |
| void | Draw () |
| void | Erase () |
| void | DisableBox (int) |
| void | EnableBox (int) |
Protected Methods | |
| void | off_last () |
| int | id_to_int (int) |
Protected Attributes | |
| int | NumObj |
| int | CurrentObj |
| int | CurrentId |
| int | IdNum |
| int | Default |
Private Methods | |
| void | disable_proc () |
| void | enable_proc () |
Private Attributes | |
| CheckBox ** | Boxes |
|
|
Definition at line 27 of file group.h.
00028 {};
|
|
||||||||||||
|
Definition at line 49 of file group.h. References Boxes, CurrentId, CurrentObj, Default, IdNum, and NumObj.
|
|
|
Definition at line 15 of file group.c. References Boxes, and CurrentObj.
00016 {
00017 for(int count=0; count<CurrentObj; count++)
00018 delete Boxes[count];
00019
00020 free (Boxes);
00021 }
|
|
||||||||||||||||
|
Definition at line 23 of file group.c. References Boxes, CurrentObj, ScrnObj::Disp, CheckBox::Init(), and NumObj. Referenced by UserInterface::TransPop(), and UserInterface::UFWOOM().
00024 {
00025 if(CurrentObj!=NumObj) {
00026 Boxes[CurrentObj] = newbox;
00027 newbox->Init(Disp, x, y);
00028
00029 CurrentObj++;
00030 }
00031 }
|
|
|
Definition at line 124 of file group.c. References Boxes, CheckBox::BoxId(), CurrentObj, Disable, ScrnObj::Disp, CheckBox::Dispatch(), Viewport::Done(), Viewport::FastDraw(), and GodMsg. Referenced by Dispatch().
|
|
|
Definition at line 82 of file group.c. References Boxes, CheckBox::ChangeStatus(), CurrentId, CurrentObj, Default, Disable, CheckBox::Dispatch(), GodMsg, id_to_int(), Off, and On. Referenced by UserInterface::TransPop().
00083 {
00084 int iteration;
00085 iteration=id_to_int(idnum);
00086
00087 Boxes[iteration]->Dispatch (Message (GodMsg, Disable, idnum));
00088
00089 if(Default==CurrentObj)
00090 Default=-1;
00091
00092 if(Default==iteration) {
00093 Default=iteration+1;
00094 CurrentId=iteration+1;
00095 Boxes[iteration]->ChangeStatus(Off);
00096 Boxes[iteration]->Dispatch (Message (GodMsg, Disable, idnum));
00097 Boxes[Default]->ChangeStatus(On);
00098 }
00099 }
|
|
|
Reimplemented from ScrnObj. Definition at line 33 of file group.c. References Boxes, Message::code, CurrentId, CurrentObj, Message::d1, Message::d2, Disable, disable_proc(), CheckBox::Dispatch(), Enable, enable_proc(), GodMsg, IdNum, Off, off_last(), On, Message::origin, and Status.
00034 {
00035 int count=0;
00036 Message msg2;
00037
00038 do{
00039 if((msg.origin==GodMsg)&&(msg.code==Disable)&&(msg.d1==IdNum))
00040 disable_proc();
00041 if((msg.origin==GodMsg)&&(msg.code==Enable)&&(msg.d1==IdNum))
00042 enable_proc();
00043
00044 msg2=Boxes[count]->Dispatch(msg);
00045 if (msg2.code==Status) {
00046 switch(msg2.d2) {
00047 case On:
00048 off_last();
00049 break;
00050 case Off:
00051 if (CurrentId==count)
00052 Boxes[CurrentId]->ChangeStatus(On);
00053 break;
00054 }
00055 CurrentId=count;
00056 }
00057 count++;
00058 }while((count<CurrentObj)&&(msg2!=Acknowledged)&&(msg2.code!=Status));
00059
00060 return msg2;
00061 }
|
|
|
Implements ScrnObj. Definition at line 63 of file group.c. References Boxes, CurrentObj, Default, ScrnObj::Disp, Viewport::Done(), CheckBox::Draw(), Viewport::FastDraw(), and On.
|
|
|
Definition at line 137 of file group.c. References Boxes, CheckBox::BoxId(), CurrentObj, Default, ScrnObj::Disp, CheckBox::Dispatch(), Viewport::Done(), Enable, Viewport::FastDraw(), GodMsg, and On. Referenced by Dispatch().
00138 {
00139 int idnum;
00140
00141 Disp->FastDraw();
00142 for(int count=0; count<CurrentObj; count++) {
00143 idnum=Boxes[count]->BoxId();
00144 Boxes[count]->Dispatch (Message (GodMsg, Enable, idnum));
00145 }
00146
00147 // Set Default button On...
00148 Boxes[Default]->ChangeStatus(On);
00149
00150 Disp->Done();
00151 } |
|
|
Definition at line 101 of file group.c. References Boxes, CurrentId, Default, CheckBox::Dispatch(), Enable, GodMsg, and id_to_int().
|
|
|
Reimplemented from ScrnObj. Definition at line 74 of file group.c. References Boxes, CurrentObj, ScrnObj::Disp, Viewport::Done(), CheckBox::Erase(), and Viewport::FastDraw().
|
|
|
Definition at line 114 of file group.c. References Boxes, and CheckBox::BoxId(). Referenced by DisableBox(), and EnableBox().
|
|
||||||||||||||||
|
Reimplemented from ScrnObj. Definition at line 33 of file group.h. References ScrnObj::Disp, ScrnObj::X, and ScrnObj::Y.
|
|
|
Definition at line 53 of file group.h. References Boxes, CurrentId, and Off. Referenced by Dispatch().
|
|
|
Definition at line 23 of file group.h. Referenced by Add(), disable_proc(), DisableBox(), Dispatch(), Draw(), enable_proc(), EnableBox(), Erase(), Group(), id_to_int(), off_last(), and ~Group(). |
|
|
Definition at line 25 of file group.h. Referenced by DisableBox(), Dispatch(), EnableBox(), Group(), and off_last(). |
|
|
Definition at line 25 of file group.h. Referenced by Add(), disable_proc(), DisableBox(), Dispatch(), Draw(), enable_proc(), Erase(), Group(), and ~Group(). |
|
|
Definition at line 25 of file group.h. Referenced by DisableBox(), Draw(), enable_proc(), EnableBox(), and Group(). |
|
|
|
|
|
|
1.2.15