Reimplemented from OglGui::StaticText. Definition at line 92 of file CheckBox.h. References OglGui::StaticText::AlignString(), OglGui::Window::DisplayFunc(), OglGui::OglWindow::GetBorderType(), OglGui::Window::GetState(), mBoxFrameType, OglGui::OglWindow::mOglWnd, mRoundedCheck, and mSelected. 00093 { 00094 Window::DisplayFunc(); 00095 00096 OGC oldOGC; 00097 OGCSave(&oldOGC); 00098 00099 SetLineWidth(1); 00100 00101 // draw the check 00102 int box = mOglWnd->height; 00103 int ins = 2; 00104 00105 if (mBoxFrameType) ins += 3; 00106 00107 SetLineColors(oglBLACK, oglGREY, oglWHITE, oglGREY); 00108 SetFillColors(oglWHITE, oglLIGHTGREY, oglDARKGREY, oglLIGHTGREY, 0); 00109 if (!GetState()) 00110 SetFillColors(oglLIGHTGREY, oglLIGHTGREY, oglLIGHTGREY, 00111 oglLIGHTGREY, 0); 00112 00113 //if (mSelected || (GetBorderType() == 0 && GetState() == 2)) 00114 // SetFillColors(oglWHITE, 0xff60a060, 0xff004000, 0xff60a060, 0); 00115 00116 if (mRoundedCheck) 00117 { 00118 FillRoundRect(ins, ins, box - 2*ins, box - 2*ins, 500); 00119 DrawRoundRect(ins+2, ins+2, box - 2*ins-4, box - 2*ins-4, 500); 00120 } 00121 else if (mSelected || (GetBorderType() == 0 && GetState() == 2)) 00122 FillRectangle(ins, ins, box - 2*ins, box - 2*ins); 00123 00124 if (mBoxFrameType) 00125 { 00126 ins -= 3; 00127 DrawBorderType(mBoxFrameType, ins, ins, box - 2*ins, 00128 box - 2*ins,0,0,0,0); 00129 } 00130 if (mSelected){ 00131 int sx = box/2; 00132 int sy = box/3; 00133 SetSolidLineColor(oglGREEN); 00134 DrawLine(sx, sy, sx - box/6, sy + box/5); 00135 DrawLine(sx, sy, sx + box/4, sy + (2*box)/3 - 2); 00136 } 00137 00138 // draw the string content 00139 AlignString(box, 0); 00140 00141 OGCRestore(&oldOGC); 00142 }
Here is the call graph for this function:
|