void CodeEdit::SetDefaultLexer() { SetLexer(wxSTC_LEX_NULL); SetKeyWords(1, ""); // Set the caret width to match MSVC. SetCaretWidth(2); // Set the marker bitmaps. MarkerDefineBitmap(Marker_Breakpoint, wxMEMORY_BITMAP(Breakpoint_png) ); MarkerDefineBitmap(Marker_CurrentLine, wxMEMORY_BITMAP(Currentline_png) ); MarkerDefineBitmap(Marker_BreakLine, wxMEMORY_BITMAP(Breakline_png) ); // Setup the dwell time before a tooltip is displayed. SetMouseDwellTime(300); SetMarginSensitive(1, true); SetMarginType(1, wxSTC_MARGIN_SYMBOL); // Set the autocomplete icons. wxColour maskColor(0xFF, 0x9B, 0x77); wxBitmap functionIcon(functionicon, wxBITMAP_TYPE_XPM); functionIcon.SetMask(new wxMask(functionicon, maskColor)); RegisterImage(AutoCompleteManager::Type_Function, functionIcon); wxBitmap classIcon(classicon, wxBITMAP_TYPE_XPM); classIcon.SetMask(new wxMask(classicon, maskColor)); RegisterImage(AutoCompleteManager::Type_Class, classIcon); }
// ---------------------------------------------------------------------------- void SnipImages::RegisterImage(char** xpm_data ) // ---------------------------------------------------------------------------- { //wxMemoryInputStream stream(xpm_data, strlen(xpm_data)+1); //wxImage img(stream, wxBITMAP_TYPE_XPM); //arrowBmp = wxBitmap(FNB::left_arrow_disabled_xpm); //arrowBmp = wxBitmap(FNB::left_arrow_disabled_xpm); wxBitmap bmp(xpm_data); wxColor maskColor(255, 0, 255); //int idx = m_pSnippetsTreeImageList->Add(bmp, maskColor); }
void CUIWidget::maskColorSetGLFront( UITRANSFORMAXIS axis ) { vec4f color = maskColor(axis); glColor4fv(color.ptr()); }
void CMapTranslate::createWidget() { vec3f ptEnd[3]; vec3f origin(0,0,0); if(glIsList(m_glList)) glDeleteLists(m_glList, 1); m_glList = glGenLists(1); glNewList(m_glList, GL_COMPILE); ptEnd[0] = m_length.x * vec3f(1.0f, 0.0f, 0.0f); ptEnd[1] = m_length.y * vec3f(0.0f, 1.0f, 0.0f); ptEnd[2] = m_length.z * vec3f(0.0f, 0.0f, 1.0f); //Octree m_axisBoxesLo[0] = vec3f(0, -AXIS_SELECTION_RADIUS, -AXIS_SELECTION_RADIUS); m_axisBoxesLo[1] = vec3f(-AXIS_SELECTION_RADIUS, 0, -AXIS_SELECTION_RADIUS); m_axisBoxesLo[2] = vec3f(-AXIS_SELECTION_RADIUS, -AXIS_SELECTION_RADIUS, 0); m_axisBoxesHi[0] = vec3f(ptEnd[0].x, AXIS_SELECTION_RADIUS, AXIS_SELECTION_RADIUS); m_axisBoxesHi[1] = vec3f(AXIS_SELECTION_RADIUS, ptEnd[1].y, AXIS_SELECTION_RADIUS); m_axisBoxesHi[2] = vec3f(AXIS_SELECTION_RADIUS, AXIS_SELECTION_RADIUS, ptEnd[2].z); glPushAttrib(GL_ALL_ATTRIB_BITS); glLineWidth(3.0f); glBegin(GL_LINES); glColor4fv(maskColor(uiaX).ptr()); glVertex3fv(origin.ptr()); glVertex3fv(ptEnd[0].ptr()); glColor4fv(maskColor(uiaY).ptr()); glVertex3fv(origin.ptr()); glVertex3fv(ptEnd[1].ptr()); glColor4fv(maskColor(uiaZ).ptr()); glVertex3fv(origin.ptr()); glVertex3fv(ptEnd[2].ptr()); glEnd(); //Draw end points vec3f v; float theta; float r = 0.05f; //X v = ptEnd[0] + vec3f(0.1f, 0.0f, 0.0f); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glBegin(GL_TRIANGLE_FAN); glColor4fv(maskColor(uiaX).ptr()); glVertex3fv(v.ptr()); for(int i=0; i<=8; i++) { theta = static_cast<float>(i) * (TwoPi / 8.0f); v.x = 0.0f; v.y = r * sin(theta); v.z = r * cos(theta); v += ptEnd[0]; glVertex3fv(v.ptr()); } glEnd(); //Y v = ptEnd[1] + vec3f(0.0f, 0.1f, 0.0f); glBegin(GL_TRIANGLE_FAN); glColor4fv(maskColor(uiaY).ptr()); glVertex3fv(v.ptr()); for(int i=0; i<=8; i++) { theta = static_cast<float>(i) * (TwoPi / 8.0f); v.x = r * cos(theta); v.y = 0.0f; v.z = r * sin(theta); v += ptEnd[1]; glVertex3fv(v.ptr()); } glEnd(); //Z v = ptEnd[2] + vec3f(0.0f, 0.0f, 0.1f); glBegin(GL_TRIANGLE_FAN); glColor4fv(maskColor(uiaZ).ptr()); glVertex3fv(v.ptr()); for(int i=0; i<=8; i++) { theta = static_cast<float>(i) * (TwoPi / 8.0f); v.x = r * cos(theta); v.y = r * sin(theta); v.z = 0.0f; v += ptEnd[2]; glVertex3fv(v.ptr()); } glEnd(); glPopAttrib(); glEndList(); }