您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wxColor函数代码示例

51自学网 2021-06-03 10:08:57
  C++
这篇教程C++ wxColor函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中wxColor函数的典型用法代码示例。如果您正苦于以下问题:C++ wxColor函数的具体用法?C++ wxColor怎么用?C++ wxColor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了wxColor函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: streamOut

/// Tests Serialization/// @return True if all tests were executed, false if notbool FontSettingTestSuite::TestCaseSerialize(){    //------Last Checked------//    // - Dec 6, 2004    bool ok = false;        TestStream testStream;    PowerTabOutputStream streamOut(testStream.GetOutputStream());        // Write test data to stream    FontSetting fontSettingOut(wxT("Arial"), 12, FontSetting::weightBold, true,        true, true, wxColor(255,0,0));    fontSettingOut.Serialize(streamOut);    // Output must be OK before using input    if (testStream.CheckOutputState())    {        PowerTabInputStream streamIn(testStream.GetInputStream());            // Read test data back from stream        FontSetting fontSettingIn;        fontSettingIn.Deserialize(streamIn,            PowerTabFileHeader::FILEVERSION_CURRENT);        // Validate the data        ok = ((fontSettingIn == fontSettingOut)             && (streamIn.CheckState()));    }        TEST(wxT("Serialize"), ok);        return (true);}    
开发者ID:RaptDept,项目名称:ptparser,代码行数:35,


示例2: render

void GraphMemory::render(wxDC &dc) {	colors::rgb tmp = colors::rgb(color);	dc.SetBrush(wxBrush(wxColor(tmp.r, tmp.g, tmp.b)));	dc.DrawRectangle(0,0,GRAPH_MEMORY_SIZE, GRAPH_MEMORY_SIZE);}
开发者ID:matemat13,项目名称:Spektrograf,代码行数:7,


示例3: GetTooltipColors

static void GetTooltipColors(){    GtkWidget* widget = gtk_window_new(GTK_WINDOW_POPUP);    const char* name = "gtk-tooltip";    if (gtk_check_version(2, 11, 0))        name = "gtk-tooltips";    gtk_widget_set_name(widget, name);    gtk_widget_ensure_style(widget);    GdkColor c = widget->style->bg[GTK_STATE_NORMAL];    gs_objects.m_colTooltip = wxColor(c);    c = widget->style->fg[GTK_STATE_NORMAL];    gs_objects.m_colTooltipText = wxColor(c);    gtk_widget_destroy(widget);}
开发者ID:SCP-682,项目名称:Cities3D,代码行数:16,


示例4: wxColor

void BetProcedureFrame::DoGoInInitialState() {	state_ = STATE_INITIAL;	m_buttonSTART->SetBackgroundColour( wxColor(0, 255, 0));	//set buttons status	m_buttonSTART->SetLabel("START");	m_buttonSTART->Enable();	m_buttonSTOP->Disable();	m_butVoltage1->Disable();	m_button5->Disable();  //-5	m_butVoltagem1->Disable();	m_txtVoltage->Disable();	m_txtCurrent->Enable();	m_txtDuration->Enable();	m_button31->Disable();	m_button41->Disable();	m_button32->Disable();	m_button42->Disable();	m_txtLimitCur1->Enable();	m_txtLimitCur2->Enable();	m_txtLimitCur3->Enable();	m_txtLimitCur4->Enable();	m_txtLimitCur5->Enable();	m_txtLimitCur6->Enable();	m_button8->Enable();	r_min_value_ = options_[std::string("r_min_value")].as<unsigned int>();	alarm_time_ = options_[std::string("alarm_time")].as<unsigned int>() * 60; //convert to seconds	r_alarm_value_ = options_[std::string("r_alarm_value")].as<unsigned int>();	r_max_value_ = options_[std::string("r_max_value")].as<unsigned int>();	r_max_hist_value_ = options_[std::string("r_max_hist_value")].as<unsigned int>();	v_check_value_ = options_[std::string("v_check_value")].as<unsigned int>();	DoZeroSwitches();}
开发者ID:dimitarm,项目名称:bet1,代码行数:32,


示例5: GUIFrameWEnum

propgridtest03Frame::propgridtest03Frame(wxFrame *frame): GUIFrameWEnum(frame){    m_CodeLog->StyleSetForeground(wxSTC_C_COMMENT, wxColor(0,128,0));    m_CodeLog->Show(false);    m_mgr.DetachPane(m_CodeLog);}
开发者ID:NewPagodi,项目名称:wxSTCmee,代码行数:7,


示例6: GetAttrByRow

    virtual bool GetAttrByRow( unsigned int row, unsigned int col,                               wxDataViewItemAttr &attr ) const	{		wxColour colors[]={*wxWHITE,wxColor(230,230,230)};		attr.SetBackgroundColour(colors[(row)%(sizeof(colors)/sizeof(colors[0]))]);		return true;	}
开发者ID:xuanya4202,项目名称:ew_base,代码行数:7,


示例7: Create

ImagePanel::ImagePanel(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& sz){	// create panel	Create(parent, id, pos, sz, wxTAB_TRAVERSAL, _T("_imgpanel"));	// stop auto erase background	SetBackgroundStyle(wxBG_STYLE_CUSTOM);	// memorydc for double buffer draw	wxInt32 iScrW = wxSystemSettings::GetMetric(wxSYS_SCREEN_X, this);	wxInt32 iScrH = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y, this);	wxBitmap bmp(iScrW, iScrH);	m_dcMem.SelectObject(bmp);	m_dcMem.SetBackground(wxBrush(wxColor(0x00606060)));	m_dcMem.Clear();	// Event process	Connect(wxEVT_PAINT, (wxObjectEventFunction)&ImagePanel::OnPaint);	Connect(wxEVT_ERASE_BACKGROUND, (wxObjectEventFunction)&ImagePanel::OnErase);	Connect(wxEVT_SIZE, (wxObjectEventFunction)&ImagePanel::OnSize);	Connect(wxEVT_CONTEXT_MENU, (wxObjectEventFunction)&ImagePanel::OnContextMenu);	Connect(wxEVT_KILL_FOCUS, (wxObjectEventFunction)&ImagePanel::OnKillFocus);	// mouse event	Connect(wxEVT_LEFT_DOWN, (wxObjectEventFunction)&ImagePanel::OnMouseLD);	Connect(wxEVT_LEFT_UP, (wxObjectEventFunction)&ImagePanel::OnMouseLU);	Connect(wxEVT_MOTION, (wxObjectEventFunction)&ImagePanel::OnMouseMove);	// menu or tool-button command	Connect(ID_CMENU_SAVE, wxEVT_MENU, (wxObjectEventFunction)&ImagePanel::OnCmenuSave);}
开发者ID:gxcast,项目名称:GEIM,代码行数:28,


示例8: dc

void ChessboardFrame::paintNIGGER(void){    wxPaintDC dc(drawPane);    dc.SetPen( wxPen( wxColor(0,0,0), 1 ) );    int k = GetVirtualSize().GetWidth()/2 - myCB->getNumCells()/2*CELL_WIDTH;    int k1 = GetVirtualSize().GetHeight()/2 - myCB->getNumCells()/2*CELL_HEIGHT;    ButtonSetBomb->SetPosition( wxPoint(GetVirtualSize().GetWidth()/2 + myCB->getNumCells()/2*CELL_WIDTH + CELL_WIDTH*2,  GetVirtualSize().GetHeight()/2 - myCB->getNumCells()/2*CELL_HEIGHT) );    ButtonShowBomb->SetPosition( wxPoint(GetVirtualSize().GetWidth()/2 + myCB->getNumCells()/2*CELL_WIDTH + CELL_WIDTH*2, GetVirtualSize().GetHeight()/2 - myCB->getNumCells()/2*CELL_HEIGHT+30) );    ButtonHideBomb->SetPosition( wxPoint(GetVirtualSize().GetWidth()/2 + myCB->getNumCells()/2*CELL_WIDTH + CELL_WIDTH*2, GetVirtualSize().GetHeight()/2 - myCB->getNumCells()/2*CELL_HEIGHT+60) );    ButtonChangeColors->SetPosition( wxPoint(GetVirtualSize().GetWidth()/2 + myCB->getNumCells()/2*CELL_WIDTH + CELL_WIDTH*2, GetVirtualSize().GetHeight()/2 - myCB->getNumCells()/2*CELL_HEIGHT+90 ) );    ButtonTimer->SetPosition( wxPoint(GetVirtualSize().GetWidth()/2 + myCB->getNumCells()/2*CELL_WIDTH + CELL_WIDTH*2, GetVirtualSize().GetHeight()/2 - myCB->getNumCells()/2*CELL_HEIGHT+120 ) );    ButtonSetBomb->Show();    ButtonShowBomb->Show();    ButtonHideBomb->Show();    ButtonChangeColors->Show();    ButtonTimer->Show();    Colors color;    for (unsigned int i = 0; i < myCB->getNumCells(); i++)  {        for (unsigned int j = 0; j < myCB->getNumCells(); j++)  {            color = myCB->getCellColor(i,j);            dc.SetBrush( *getBrushColor(color) );            dc.DrawRectangle(i*CELL_WIDTH+k, j*CELL_HEIGHT+k1, CELL_WIDTH, CELL_HEIGHT);            if(!myCB->isBombHidden())  {                drawBomb();            }        }    }}
开发者ID:alkz,项目名称:Various,代码行数:32,


示例9: onActiveToggle

	void onActiveToggle(bool state)	{		if (state)		{			m_colNormal = wxColor(GetGCThemeManager()->getColor("itemToolBar", "fg"));			m_szImage = "#playlist_button_normal";		}		else		{			m_colNormal = wxColor(GetGCThemeManager()->getColor("itemToolBar", "na-fg"));			m_szImage = "#playlist_button_nonactive";		}		refreshImage(true);		invalidatePaint();	}
开发者ID:aromis,项目名称:desura-app,代码行数:16,


示例10: Freeze

void ProcList::showList(int highlight){	int c = 0;	Freeze();	DeleteAllItems();	for (std::vector<Database::Item>::const_iterator i = list.items.begin(); i != list.items.end(); i++)	{		const Database::Symbol *sym = i->symbol;		double inclusive = i->inclusive;		double exclusive = i->exclusive;		float inclusivepercent = i->inclusive * 100.0f / list.totalcount;		float exclusivepercent = i->exclusive * 100.0f / list.totalcount;		InsertItem(c, sym->procname.c_str(), -1);		if(sym->isCollapseFunction || sym->isCollapseModule) {			SetItemTextColour(c,wxColor(0,128,0));		}		setColumnValue(c, COL_EXCLUSIVE,	wxString::Format("%0.2fs",exclusive));		setColumnValue(c, COL_INCLUSIVE,	wxString::Format("%0.2fs",inclusive));		setColumnValue(c, COL_EXCLUSIVEPCT,	wxString::Format("%0.2f%%",exclusivepercent));		setColumnValue(c, COL_INCLUSIVEPCT,	wxString::Format("%0.2f%%",inclusivepercent));		setColumnValue(c, COL_SAMPLES,		wxString::Format("%0.2fs",exclusive));		setColumnValue(c, COL_CALLSPCT,		wxString::Format("%0.2f%%",exclusivepercent));		setColumnValue(c, COL_MODULE,		sym->module.c_str());		setColumnValue(c, COL_SOURCEFILE,	sym->sourcefile.c_str());		setColumnValue(c, COL_SOURCELINE,	::toString(sym->sourceline).c_str());		c++;	}	this->SetItemState(highlight, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED, wxLIST_STATE_FOCUSED|wxLIST_STATE_SELECTED);	Thaw();	EnsureVisible(highlight);}
开发者ID:CyberShadow,项目名称:verysleepy-1,代码行数:35,


示例11: GetClientSize

void AngularMeter::DrawSectors(wxDC &dc){	int w,h ;	GetClientSize(&w,&h);	int hOffset = 0;	int wOffset = 0;	if (w > h) wOffset = (w - h) / 2;	if (h > w) hOffset = (h - w) / 2;	//square out the size	if (w > h) w=h;	if (h > w) h=w;	//Draw the dial	dc.SetPen(*wxThePenList->FindOrCreatePen(_dialColor,1 , wxSOLID));	dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(_dialColor,wxSOLID));	dc.DrawEllipticArc(0 + wOffset, 0 + hOffset, w, h, 0,  360);	dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(*wxBLACK, wxTRANSPARENT));	dc.SetPen(*wxThePenList->FindOrCreatePen(wxColor(0x25,0x25,0x25), 2, wxSOLID));	dc.DrawEllipticArc(0 + wOffset, 0 + hOffset, w, h, 45, -135);	dc.SetPen(*wxThePenList->FindOrCreatePen(wxColor(0x55,0x55,0x55), 2, wxSOLID));	dc.DrawEllipticArc(0 + wOffset, 0 + hOffset, w, h, -135, 45);	//Done drawing dial	//Draw warning range	if (_realWarningValue > 0){		dc.SetPen(*wxThePenList->FindOrCreatePen(_warningColor,2, wxSOLID));		dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(_warningColor, wxFDIAGONAL_HATCH));		double warningEnd = _angleEnd - _scaledWarningValue;		double warningStart = (_realAlertValue > 0 ? _angleEnd - _scaledAlertValue : _angleStart);		dc.DrawEllipticArc(0 + wOffset + 1, 0 + hOffset + 1, w - 2, h - 2, warningStart, warningEnd);	}	if (_realAlertValue > 0){		dc.SetPen(*wxThePenList->FindOrCreatePen(_alertColor, 3, wxSOLID));		dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(_alertColor, wxBDIAGONAL_HATCH));		dc.DrawEllipticArc(0 + wOffset + 1, 0 + hOffset + 1, w - 2, h - 2, _angleStart, _angleEnd - _scaledAlertValue);	}}
开发者ID:BMWPower,项目名称:gaugeWorks,代码行数:47,


示例12: m_ImageList

wxPageContainer::wxPageContainer(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style): m_ImageList(NULL), m_iActivePage(-1), m_pDropTarget(NULL), m_nLeftClickZone(wxFNB_NOWHERE), m_customizeOptions(wxFNB_CUSTOM_ALL), m_fixedTabWidth(wxNOT_FOUND){	m_pRightClickMenu = NULL;	m_nXButtonStatus = wxFNB_BTN_NONE;	m_nArrowDownButtonStatus = wxFNB_BTN_NONE;	m_pParent = parent;	m_nRightButtonStatus = wxFNB_BTN_NONE;	m_nLeftButtonStatus = wxFNB_BTN_NONE;	m_nTabXButtonStatus = wxFNB_BTN_NONE;	m_customMenu = NULL;	m_colorTo = wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));	m_colorFrom   = wxColor(*wxWHITE);	m_activeTabColor = wxColor(*wxWHITE);	m_activeTextColor = wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));	m_nonActiveTextColor = wxColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNTEXT));	m_tabAreaColor = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);	m_tabAreaColor = wxFNBRenderer::DarkColour(m_tabAreaColor, 12);	// Set default page height, this is done according to the system font	wxMemoryDC memDc;	wxBitmap bmp(10, 10);	memDc.SelectObject(bmp);	int width, height;#ifdef __WXGTK__	wxFont normalFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);	wxFont boldFont = normalFont;	boldFont.SetWeight(wxBOLD);	memDc.SetFont( boldFont );#endif	memDc.GetTextExtent(wxT("Tp"), &width, &height);	int tabHeight = height + wxFNB_HEIGHT_SPACER; // We use 10 pixels as padding	wxWindow::Create(parent, id, pos, wxSize(size.x, tabHeight), style | wxNO_BORDER | wxNO_FULL_REPAINT_ON_RESIZE);	m_pDropTarget = new wxFNBDropTarget<wxPageContainer>(this, &wxPageContainer::OnDropTarget);	SetDropTarget(m_pDropTarget);}
开发者ID:05storm26,项目名称:codelite,代码行数:47,


示例13: wxCHECK

/// Updates the contents of the FontSetting object using a delimited string containing the font settings/// @param string Comma delimited string containing the font settings (FaceName,PointSize,Weight,Italic(T/F),Underline(T/F),StrikeOut(T/F),Color)/// @return success or failurebool FontSetting::SetFontSettingFromString(const wxChar* string){    //------Last Checked------//    // - Dec 6, 2004    wxCHECK(string != NULL, false);        wxString temp;    // Extract the face name    wxExtractSubString(temp, string, 0, wxT(','));    temp.Trim(false);    temp.Trim();    m_faceName = temp;    if (m_faceName.IsEmpty())        m_faceName = DEFAULT_FACENAME;    // Extract the point size    wxExtractSubString(temp, string, 1, wxT(','));    temp.Trim(false);    temp.Trim();    m_pointSize = wxAtoi(temp);    if (m_pointSize == 0)        m_pointSize = DEFAULT_POINTSIZE;    // Extract the weight    wxExtractSubString(temp, string, 2, wxT(','));    temp.Trim(false);    temp.Trim();    m_weight = wxAtoi(temp);    if ((m_weight % 100) != 0)        m_weight = DEFAULT_WEIGHT;        // Extract the italic setting    wxExtractSubString(temp, string, 3, wxT(','));    temp.Trim(false);    temp.Trim();    m_italic = (wxByte)((::wxStricmp(temp, wxT("T")) == 0) ? true : false);        // Extract the underline setting    wxExtractSubString(temp, string, 4, wxT(','));    temp.Trim(false);    temp.Trim();    m_underline = (wxByte)((::wxStricmp(temp, wxT("T")) == 0) ? true : false);    // Extract the strikeout setting    wxExtractSubString(temp, string, 5, wxT(','));    temp.Trim(false);    temp.Trim();    m_strikeOut = (wxByte)((::wxStricmp(temp, wxT("T")) == 0) ? true : false);    // Extract the color    wxExtractSubString(temp, string, 6, wxT(','));    temp.Trim(false);    temp.Trim();    wxUint32 color = wxAtoi(temp);    m_color = wxColor(LOBYTE(LOWORD(color)), HIBYTE(LOWORD(color)), LOBYTE(HIWORD(color)));        return (true);}
开发者ID:BackupTheBerlios,项目名称:ptparser-svn,代码行数:62,


示例14: BEATS_ASSERT

void CGradientCtrl::OnSliderScroll(wxScrollEvent& event){    BEATS_ASSERT(m_pSelectedCursor != nullptr);    BEATS_ASSERT(m_pSelectedCursor->GetType() == eCT_Alpha);    int value = event.GetPosition();    m_pSelectedCursor->SetColor(wxColor(value, value, value));    Refresh(true);}
开发者ID:hejiero,项目名称:BeyondEngine,代码行数:8,


示例15: get

wxColor SkinConfig::get(skin_color_t item) const{	if (item<=COLOR_CONFIG_MAX)	{		return color[item].IsOk()?color[item]:wxColor(0x111111);	}	return 1;}
开发者ID:chenall,项目名称:ALMRun,代码行数:8,


示例16: ASSERT

void BrushListBox::OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const{	ASSERT(n < tileset->size());	Sprite* spr = g_gui.gfx.getSprite(tileset->brushlist[n]->getLookID());	if(spr) {		spr->DrawTo(&dc, SPRITE_SIZE_32x32, rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight());	}	if(IsSelected(n)) {		if(HasFocus())			dc.SetTextForeground(wxColor(0xFF, 0xFF, 0xFF));		else			dc.SetTextForeground(wxColor(0x00, 0x00, 0xFF));	} else {		dc.SetTextForeground(wxColor(0x00, 0x00, 0x00));	}	dc.DrawText(wxstr(tileset->brushlist[n]->getName()), rect.GetX() + 40, rect.GetY() + 6);}
开发者ID:HeavenIsLost,项目名称:rme,代码行数:17,


示例17: wxPanel

MinimapWindow::MinimapWindow(wxWindow* parent) :    wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(205, 130)),    update_timer(this){    for(int i = 0; i < 256; ++i) {        pens[i] = newd wxPen(wxColor(minimap_color[i].red, minimap_color[i].green, minimap_color[i].blue));    }}
开发者ID:hjnilsson,项目名称:rme,代码行数:8,


示例18: dc

void gcStaticLine::onPaint( wxPaintEvent& event ){	wxPaintDC dc(this);	if (!m_imgHR.getImg() || !m_imgHR->IsOk())	{		dc.SetTextForeground(wxColor(25,25,25));		dc.Clear();		return;	}	int h = GetSize().GetHeight();	int w = GetSize().GetWidth();#ifdef WIN32 // unused AFAIK	int ih = m_imgHR->GetSize().GetHeight();#endif 	int iw = m_imgHR->GetSize().GetWidth();	wxBitmap   tmpBmp(w, h);	wxMemoryDC tmpDC(tmpBmp);	tmpDC.SetBrush(wxBrush(wxColor(255,0,255)));	tmpDC.SetPen( wxPen(wxColor(255,0,255),1) );	tmpDC.DrawRectangle(0,0,w,h);	wxImage scaled = m_imgHR->Scale(iw, h);	wxBitmap left = GetGCThemeManager()->getSprite(scaled, "horizontal_rule", "Left");	wxBitmap right = GetGCThemeManager()->getSprite(scaled, "horizontal_rule", "Right");	wxBitmap centerImg = GetGCThemeManager()->getSprite(scaled, "horizontal_rule", "Center");	wxBitmap center(w-(left.GetWidth()+right.GetWidth()),h);	wxColor c(255,0,255);	gcImage::tileImg(center, centerImg, &c);	tmpDC.DrawBitmap(left, 0,0,true);	tmpDC.DrawBitmap(center, left.GetWidth(),0,true);	tmpDC.DrawBitmap(right, w-right.GetWidth(),0,true);	tmpDC.SelectObject(wxNullBitmap);	dc.DrawBitmap(tmpBmp, 0,0, true);	wxRegion region = wxRegion(tmpBmp, wxColor(255,0,255), 1);	SetShape(region, this);}
开发者ID:CSRedRat,项目名称:desura-app,代码行数:46,


示例19: OnListGetItemAttr

wxListItemAttr* CBOINCBaseView::OnListGetItemAttr(long item) const {    // If we are using some theme where the default background color isn't    //   white, then our whole system is boned. Use defaults instead.    if (wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW) != wxColor(wxT("WHITE"))) return NULL;    return item % 2 ? m_pGrayBackgroundAttr : m_pWhiteBackgroundAttr;}
开发者ID:williamsullivan,项目名称:AndroidBOINC,代码行数:8,


示例20: wxPen

void BasicDrawPane::drawLine(int startx, int starty, int stopx,int stopy,int width,int r, int g , int b){  wxMemoryDC memDC;  memDC.SelectObject(bmp);  memDC.SetPen( wxPen( wxColor(r,b,g), width ) ); // black line, 3 pixels thick  memDC.DrawLine( startx, starty, stopx, stopy ); // draw line across the rectangle}
开发者ID:bolvtin,项目名称:asv-navigator,代码行数:8,


示例21: wxDialog

void ScummVMToolsApp::OnAbout() {	wxDialog *dialog = new wxDialog(NULL, wxID_ANY, wxT("About"), wxDefaultPosition, wxSize(500, 380));	wxSizer *topsizer = new wxBoxSizer(wxVERTICAL);	topsizer->Add(new Header(dialog, wxT("detaillogo.jpg"), wxT("tile.gif"), wxT("")), wxSizerFlags().Expand());	wxSizer *sizer = new wxBoxSizer(wxVERTICAL);	// Create text content	wxStaticText *titletext = new wxStaticText(dialog, wxID_ANY, wxT("ScummTools GUI"));	titletext->SetFont(wxFont(22, wxSWISS, wxNORMAL, wxBOLD, false, wxT("Arial")));	sizer->Add(titletext, wxSizerFlags());	wxStaticText *versiontext = new wxStaticText(dialog, wxID_ANY, wxString(gScummVMToolsVersionDate, wxConvISO8859_1));	versiontext->SetForegroundColour(wxColor(128, 128, 128));	versiontext->SetFont(wxFont(10, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Arial")));	sizer->Add(versiontext, wxSizerFlags());	wxHyperlinkCtrl *websitetext = new wxHyperlinkCtrl(dialog, wxID_ANY, wxT("http://www.scummvm.org"), wxT("http://www.scummvm.org"));	sizer->Add(websitetext, wxSizerFlags().Border(wxTOP, 5));	wxStaticText *copyrighttext = new wxStaticText(dialog, wxID_ANY, wxT("Copyright ScummVM Team 2009-2019"));	copyrighttext->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Arial")));	sizer->Add(copyrighttext, wxSizerFlags());	wxStaticText *descriptiontext = new wxStaticText(dialog, wxID_ANY,		wxT("This tool allows you to extract data files from several different games /n")		wxT("to be used by ScummVM, it can also compress audio data files into a more /n")		wxT("compact format than the original."));	descriptiontext->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Arial")));	sizer->Add(descriptiontext, wxSizerFlags().Border(wxTOP, 6));	wxStaticText *licensetext = new wxStaticText(dialog, wxID_ANY,		wxT("Published under the GNU General Public License/n")		wxT("This program comes with ABSOLUTELY NO WARRANTY/n")		wxT("This is free software, and you are welcome to redistribute it ")		wxT("under certain conditions"));	licensetext->SetFont(wxFont(8, wxSWISS, wxNORMAL, wxNORMAL, false, wxT("Arial")));	sizer->Add(licensetext, wxSizerFlags().Border(wxTOP, 10));	// Apply layout	topsizer->Add(sizer, wxSizerFlags().Expand().Border(wxALL, 10));	// Add the standard buttons (only one)	topsizer->Add(dialog->CreateStdDialogButtonSizer(wxOK), wxSizerFlags().Center().Border());	// Add the standard buttons	dialog->SetSizerAndFit(topsizer);	// Display it	dialog->ShowModal();	// Destroy it	dialog->Destroy();}
开发者ID:scummvm,项目名称:scummvm-tools,代码行数:58,


示例22: st

void StudentEditDlg::showClass(){	wxString studentName = m_name->GetValue().Trim(FROM_LEFT).Trim(FROM_RIGHT);	if (studentName.empty()) return;	wxListCtrl *pLc = m_lClass;	pLc->DeleteAllItems();		SqlLiteStatement st("SELECT * FROM TBL_CALENDAR_CLASS_STUDENT WHERE /						STUDENT_NAME = :studentName ORDER BY CLASS_DATE DESC LIMIT 0, 100");	SqlLiteBind(st, "studentName", studentName);	for (int row = 0; SQLITE_ROW == sqlite3_step(st); ++row)	{		int col = 0;		wxString classDate = SqlLiteColumnStr(st, col++);		int classNumber = SqlLiteColumnInt(st, col++);		wxString teacherName = SqlLiteColumnStr(st, col++);		col++;		int leave = SqlLiteColumnInt(st, col++);		int classFee = SqlLiteColumnInt(st, col++);		wxString studentMemo = SqlLiteColumnStr(st, col++);		wxString className;		wxString classMemo;		int oneShot = 0;		int practice = 0;		SqlLiteStatement st("SELECT * FROM TBL_CALENDAR_CLASS WHERE /							CLASS_DATE = :classDate AND /							CLASS_NUMBER = :classNumber AND /							TEACHER_NAME = :teacherName");		SqlLiteBind(st, "classDate", classDate);		SqlLiteBind(st, "classNumber", classNumber);		SqlLiteBind(st, "teacherName", teacherName);		if (SQLITE_ROW == sqlite3_step(st))		{			col = 3;			className = SqlLiteColumnStr(st, col++);			practice = SqlLiteColumnInt(st, col++);			oneShot = SqlLiteColumnInt(st, col++);			classMemo = SqlLiteColumnStr(st, col++);		}		col = 0;		pLc->InsertItem(row, wxEmptyString);		if (classDate < wxDateTime::Today().FormatISODate()) 			pLc->SetItemBackgroundColour(row, wxColor(234, 234, 234));		if (oneShot) pLc->SetItemTextColour(row, *wxBLUE);		if (leave) pLc->SetItemTextColour(row, *wxRED);		pLc->SetItem(row, col, classDate); col++;		pLc->SetItem(row, col, CLASS_NUMBER_STR[classNumber]); col++;		pLc->SetItem(row, col, teacherName); col++;		pLc->SetItem(row, col, CLASS_STUDENT_LEAVE_STR[leave]); col++;		pLc->SetItem(row, col, wxString::Format("%d", classFee)); col++;		pLc->SetItem(row, col, CLASS_PRACTICE_STR[practice]); col++;		pLc->SetItem(row, col, className); col++;		pLc->SetItem(row, col, classMemo); col++;		pLc->SetItem(row, col, studentMemo); col++;	}}
开发者ID:aclisp,项目名称:large-scale,代码行数:58,


示例23: pen

void ElementCanvasWindow::DrawGrid(wxGraphicsContext &gc){    wxPen pen(wxColor(0x7F, 0x7F, 0x7F), 1);    gc.SetPen(pen);    for (size_t i = 0; i < 20; i += 10)    {        gc.StrokeLine(i, 0, i, 20);    }}
开发者ID:Kvaz1r,项目名称:wxCharts,代码行数:9,


示例24: wxsWidget

wxsLedNumber::wxsLedNumber(wxsItemResData* Data) : wxsWidget( Data, &Reg.Info, NULL, NULL, flVariable | flId | flPosition | flSize | flColours | flMinMaxSize | flExtraCode){    //ctor    Content      = _("");    Align        = wxLED_ALIGN_LEFT;    Faded        = true;    GetBaseProps()->m_Fg = wxColour( 0, 255, 0);    GetBaseProps()->m_Bg = wxColor( 0 ,0 ,0);}
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:9,


示例25: wxPen

void BasicDrawPane::renderTrue(wxDC& dc){	dc.Clear();	// draw a circle	if (menu->number != 0)	{	dc.SetBrush(*wxGREEN_BRUSH); // green filling    dc.SetPen( wxPen( wxColor(255,0,0), 3 ) ); // 5-pixels-thick red outline    dc.DrawCircle( wxPoint(menu->pArray[0].x, menu->pArray[0].y), 10 /* radius */ );	dc.SetBrush(*wxBLUE_BRUSH);	dc.SetPen( wxPen( wxColor(255,255,0), 3 ) );	for (int i = 1; i < menu->number; i++)	{		dc.DrawCircle( wxPoint(menu->pArray[i].x,menu->pArray[i].y), 5 /* radius */ );	}	}}
开发者ID:rlorlo,项目名称:CIS22C-DataStructure,代码行数:18,


示例26: draw

void equipAlignRenderer::onPaint(wxPaintEvent& event) {	wxPaintDC draw(this);		draw.SetBackground(wxBrush(wxColor("gray")));			draw.Clear();				draw.DrawBitmap(*parentAlignWindow->bodyPartBitmap,wxPoint(xOrigin-parentAlignWindow->bodyPartSpriteOrigin->x,yOrigin-parentAlignWindow->bodyPartSpriteOrigin->y));		draw.DrawBitmap(*parentAlignWindow->equipmentBitmap,wxPoint(xOrigin+parentAlignWindow->equipmentPosition->x-parentAlignWindow->equipmentSpriteOrigin->x,yOrigin+parentAlignWindow->equipmentPosition->y-parentAlignWindow->equipmentSpriteOrigin->y));}
开发者ID:Screetch,项目名称:GrandTale,代码行数:9,


示例27: OnAnyChange

void GribRequestSetting::OnAnyChange(wxCommandEvent &event){    //permit to send a new message    m_MailImage->SetForegroundColour(wxColor( 0, 0, 0 ));    m_bSend->Show();    m_MailImage->SetLabel( WriteMail() );    Fit();}
开发者ID:bingcheng,项目名称:OpenCPN,代码行数:9,


示例28: render

/* * Here we do the actual rendering. I put it in a separate * method so that it can work no matter what type of DC * (e.g. wxPaintDC or wxClientDC) is used. */void wxStateButton::render(wxDC& dc) {	int w;	int h;	dc.GetSize(&w,&h);    if (m_bChecked) {        dc.SetBrush(*wxGREY_BRUSH);		dc.SetTextForeground(wxColor(255, 255, 255));	} else {        dc.SetBrush(wxBrush(wxColor(64, 64, 64))); 		dc.SetTextForeground(*wxLIGHT_GREY);	}	dc.SetPen(*wxGREY_PEN);	wxRect r = GetClientRect();    dc.DrawRectangle(0, 0, w, h);	dc.SetFont(wxSystemSettings::GetFont(wxSystemFont::wxSYS_DEFAULT_GUI_FONT));	dc.DrawLabel(GetLabel(), r, wxALIGN_CENTER_VERTICAL | wxALIGN_CENTER_HORIZONTAL);}
开发者ID:orxx,项目名称:BodySlide-and-Outfit-Studio,代码行数:23,


示例29: SetHtmlColors

void SetHtmlColors(){	wxColourDatabase *cdb=wxTheColourDatabase;	HtmlColor *hc=HtmlColorTable;	for(int	i=0; i<HtmlColorTableCount;	++i, ++hc)	{		cdb->AddColour(hc->name, wxColor(hc->red, hc->green, hc->blue));	}}
开发者ID:KrasnayaPloshchad,项目名称:madedit-mod,代码行数:9,



注:本文中的wxColor函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ wxColour函数代码示例
C++ wxCloseEventHandler函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。