📄 radio.cpp
字号:
// 1993 (c) ALL RIGHTS RESERVED
// AUTHOR: XuYongYong
/* radio.cpp
*/
#include "radio.h"
/**************************************************************************/
radio_class::radio_class (int ID,char *title_hotkey,
int left,int top,int width,int height )
:checkbox_class(ID,title_hotkey,left,top,width,height)
{ type =RADIO;}
/***************************************************************************/
void radio_class::draw ()
{
if ( status & INVISIBLE) return; // INVISIBLE
setcolor (BLACK);
FrameOval (box);
control_class::draw ();
}
/**************************************************************************/
int radio_class::control_change_value
(int new_value )
{ if (control_class::control_change_value(new_value)==TRUE)
return TRUE;
Trect tmprect=box;
InsetRect (&tmprect,-2,-2);
switch (new_value) {
case UNCHECKED:
FillOval (box,WHITE);
break;
case CHECKED:
FillOval (tmprect,BLACK);
break;
}
current_value =new_value;
return TRUE;
}
/**************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -