本文整理汇总了C++中GetBackgroundColour函数的典型用法代码示例。如果您正苦于以下问题:C++ GetBackgroundColour函数的具体用法?C++ GetBackgroundColour怎么用?C++ GetBackgroundColour使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetBackgroundColour函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: wxMultiColumnListCtrl
bool wxSwitcherDialog::Create( const wxSwitcherItems& items, wxWindow *parent, wxWindowID id,
const wxString& title, const wxPoint &position, const wxSize& size, long style )
{
m_switcherBorderStyle = (style & wxBORDER_MASK);
if (m_switcherBorderStyle == wxBORDER_NONE)
m_switcherBorderStyle = wxBORDER_SIMPLE;
style &= wxBORDER_MASK;
style |= wxBORDER_NONE;
wxScrollingDialog::Create( parent, id, title, position, size, style );
m_listCtrl = new wxMultiColumnListCtrl();
m_listCtrl->SetItems(items);
m_listCtrl->Create(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxWANTS_CHARS|wxNO_BORDER);
m_listCtrl->CalculateLayout();
if (m_extraNavigationKey != -1)
m_listCtrl->SetExtraNavigationKey(m_extraNavigationKey);
if (m_modifierKey != -1)
m_listCtrl->SetModifierKey(m_modifierKey);
int borderStyle = wxSIMPLE_BORDER;
borderStyle = wxBORDER_NONE;
m_descriptionCtrl = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxSize(-1, 100), borderStyle);
m_descriptionCtrl->SetHTMLBackgroundColour(GetBackgroundColour());
#ifdef __WXGTK20__
int fontSize = 11;
m_descriptionCtrl->SetStandardFonts(fontSize);
#endif
wxSizer* sizer = new wxBoxSizer(wxVERTICAL);
SetSizer(sizer);
sizer->Add(m_listCtrl, 1, wxALL|wxEXPAND, 10);
sizer->Add(m_descriptionCtrl, 0, wxALL|wxEXPAND, 10);
sizer->SetSizeHints(this);
m_listCtrl->SetFocus();
Centre(wxBOTH);
if (m_listCtrl->GetItems().GetSelection() == -1)
m_listCtrl->GetItems().SetSelection(0);
m_listCtrl->AdvanceToNextSelectableItem(1);
ShowDescription(m_listCtrl->GetItems().GetSelection());
return true;
}
开发者ID:jenslody,项目名称:codeblocks,代码行数:55,代码来源:switcherdlg.cpp
示例2: GetBackgroundColour
WXHBRUSH wxControl::MSWControlColor(WXHDC pDC, WXHWND hWnd)
{
wxColour colBg;
if ( HasTransparentBackground() )
::SetBkMode((HDC)pDC, TRANSPARENT);
else // if the control is opaque it shouldn't use the parents background
colBg = GetBackgroundColour();
return DoMSWControlColor(pDC, colBg, hWnd);
}
开发者ID:Duion,项目名称:Torsion,代码行数:11,代码来源:control.cpp
示例3: WXUNUSED
bool AboutDialog::Create( wxWindow* parent, wxWindowID WXUNUSED(id), const wxString& WXUNUSED(caption), const wxPoint& WXUNUSED(pos), const wxSize& WXUNUSED(size), long WXUNUSED(style) )
{
////@begin AboutDialog member initialisation
m_pHtmlWindow = NULL;
////@end AboutDialog member initialisation
////@begin AboutDialog creation
SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
SetParent(parent);
CreateControls();
SetIcon(GetIconResource(wxT("res/nx.png")));
if (GetSizer())
{
GetSizer()->SetSizeHints(this);
}
Centre();
////@end AboutDialog creation
int fs[7];
wxFont fv = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
wxFont ff = wxSystemSettings::GetFont(wxSYS_ANSI_FIXED_FONT);
for (int i = 0; i < 7; i++)
fs[i] = fv.GetPointSize();
m_pHtmlWindow->SetFonts(fv.GetFaceName(), ff.GetFaceName(), fs);
m_pHtmlWindow->SetBorders(0);
wxString version = _("Version") + wxString::Format(wxT(" <B>%s</B>"),
::wxGetApp().GetVersion().c_str());
#ifdef __WXDEBUG__
version += wxT(" (DEBUG)");
#else
version += wxT(" (RELEASE)");
#endif
wxString content = ::wxGetApp().LoadFileFromResource(wxT("res/about.html"));
content.Replace(wxT("<VERSION>"), version);
content.Replace(wxT("<WXVERSION>"), wxVERSION_STRING);
content.Replace(wxT("\"res:"), wxT("\"") + ::wxGetApp().GetResourcePrefix());
m_pHtmlWindow->SetPage(content);
m_pHtmlWindow->SetBackgroundColour(GetBackgroundColour());
if (!content.IsEmpty()) {
int width, height;
m_pHtmlWindow->GetSize(&width, &height);
m_pHtmlWindow->GetInternalRepresentation()->Layout(width);
height = m_pHtmlWindow->GetInternalRepresentation()->GetHeight();
width = m_pHtmlWindow->GetInternalRepresentation()->GetWidth();
m_pHtmlWindow->SetSize(width, height);
m_pHtmlWindow->SetSizeHints(width, height);
Fit();
}
return TRUE;
}
开发者ID:carriercomm,项目名称:opennx-1,代码行数:54,代码来源:AboutDialog.cpp
示例4: WXUNUSED
void wxVListBox::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxSize clientSize = GetClientSize();
wxAutoBufferedPaintDC dc(this);
// the update rectangle
wxRect rectUpdate = GetUpdateClientRect();
// fill it with background colour
dc.SetBackground(GetBackgroundColour());
dc.Clear();
// the bounding rectangle of the current line
wxRect rectLine;
rectLine.width = clientSize.x;
// iterate over all visible lines
const size_t lineMax = GetVisibleEnd();
for ( size_t line = GetFirstVisibleLine(); line < lineMax; line++ )
{
const wxCoord hLine = OnGetLineHeight(line);
rectLine.height = hLine;
// and draw the ones which intersect the update rect
if ( rectLine.Intersects(rectUpdate) )
{
// don't allow drawing outside of the lines rectangle
wxDCClipper clip(dc, rectLine);
wxRect rect = rectLine;
OnDrawBackground(dc, rect, line);
OnDrawSeparator(dc, rect, line);
rect.Deflate(m_ptMargins.x, m_ptMargins.y);
OnDrawItem(dc, rect, line);
}
else // no intersection
{
if ( rectLine.GetTop() > rectUpdate.GetBottom() )
{
// we are already below the update rect, no need to continue
// further
break;
}
//else: the next line may intersect the update rect
}
rectLine.y += hLine;
}
}
开发者ID:hgwells,项目名称:tive,代码行数:53,代码来源:vlbox.cpp
示例5: dc
void gcSpinningBar::onPaint(wxPaintEvent& event)
{
wxPaintDC dc(this);
if (GetSize().GetWidth() == 0 || GetSize().GetHeight() == 0)
return;
dc.SetTextBackground(GetBackgroundColour());
if (m_imgProg.getImg() && m_imgProg->IsOk())
doPaint(&dc);
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:12,代码来源:gcSpinningBar.cpp
示例6: WXUNUSED
void wxShapeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc(this);
PrepareDC(dc);
dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID));
dc.Clear();
if (GetDiagram())
GetDiagram()->Redraw(dc);
}
开发者ID:crioux,项目名称:SpeedDemon-Profiler,代码行数:12,代码来源:canvas.cpp
示例7: bmp
wxBitmap CRemoteTreeView::CreateIcon(int index, const wxString& overlay /*=_T("")*/)
{
// Create memory DC
wxSize s = CThemeProvider::GetIconSize(iconSizeSmall);
#ifdef __WXMSW__
wxBitmap bmp(s.x, s.y, 32);
#else
wxBitmap bmp(s.x, s.y, 24);
#endif
wxMemoryDC dc;
dc.SelectObject(bmp);
// Make sure the background is set correctly
dc.SetBrush(wxBrush(GetBackgroundColour()));
dc.SetPen(wxPen(GetBackgroundColour()));
dc.DrawRectangle(0, 0, s.x, s.y);
// Draw item from system image list
GetSystemImageList()->Draw(index, dc, 0, 0, wxIMAGELIST_DRAW_TRANSPARENT);
// Load overlay
if (!overlay.empty())
{
wxImage unknownIcon = wxArtProvider::GetBitmap(overlay, wxART_OTHER, CThemeProvider::GetIconSize(iconSizeSmall)).ConvertToImage();
// Convert mask into alpha channel
if (unknownIcon.IsOk() && !unknownIcon.HasAlpha())
{
wxASSERT(unknownIcon.HasMask());
unknownIcon.InitAlpha();
}
// Draw overlay
dc.DrawBitmap(unknownIcon, 0, 0, true);
}
dc.SelectObject(wxNullBitmap);
return bmp;
}
开发者ID:oneminot,项目名称:filezilla3,代码行数:39,代码来源:RemoteTreeView.cpp
示例8: WXUNUSED
void wxGenericHyperlinkCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc(this);
dc.SetFont(GetFont());
dc.SetTextForeground(GetForegroundColour());
dc.SetTextBackground(GetBackgroundColour());
dc.DrawText(GetLabel(), GetLabelRect().GetTopLeft());
if (HasFocus())
{
wxRendererNative::Get().DrawFocusRect(this, dc, GetClientRect(), wxCONTROL_SELECTED);
}
}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:13,代码来源:hyperlinkg.cpp
示例9: dc
void AttentionBar::OnPaint(wxPaintEvent&)
{
wxPaintDC dc(this);
wxRect rect(dc.GetSize());
auto bg = GetBackgroundColour();
dc.SetBrush(*wxTRANSPARENT_BRUSH);
dc.SetPen(bg.ChangeLightness(90));
#ifndef __WXOSX__
dc.DrawLine(rect.GetTopLeft(), rect.GetTopRight());
#endif
dc.DrawLine(rect.GetBottomLeft(), rect.GetBottomRight());
}
开发者ID:benpope82,项目名称:poedit,代码行数:13,代码来源:attentionbar.cpp
示例10: WXUNUSED
void MuleGifCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxBufferedPaintDC dc(this);
wxSize clientsize = GetClientSize();
wxSize gifsize = m_decoder->GetAnimationSize();
int x = (clientsize.GetWidth()-gifsize.GetWidth())/2;
int y = (clientsize.GetHeight()-gifsize.GetHeight())/2;
dc.SetBackground(*(wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID)));
dc.Clear();
dc.DrawBitmap(m_frame, x, y, true);
}
开发者ID:Artoria2e5,项目名称:amule-dlp,代码行数:13,代码来源:MuleGifCtrl.cpp
示例11: WXUNUSED
WXHBRUSH wxButton::OnCtlColor( WXHDC WXUNUSED(pDC),
WXHWND WXUNUSED(pWnd),
WXUINT WXUNUSED(nCtlColor),
WXUINT WXUNUSED(uMessage),
WXWPARAM WXUNUSED(wParam),
WXLPARAM WXUNUSED(lParam) )
{
wxBrush* pBackgroundBrush = wxTheBrushList->FindOrCreateBrush( GetBackgroundColour()
,wxSOLID
);
return (WXHBRUSH)pBackgroundBrush->GetResourceHandle();
} // end of wxButton::OnCtlColor
开发者ID:LuaDist,项目名称:wxwidgets,代码行数:13,代码来源:button.cpp
示例12: DimeControl
void AISTargetQueryDialog::SetColorScheme( ColorScheme cs )
{
DimeControl( this );
wxColor bg = GetBackgroundColour();
m_pQueryTextCtl->SetBackgroundColour( bg );
SetBackgroundColour( bg ); // This looks like non-sense, but is needed for __WXGTK__
// to get colours to propagate down the control's family tree.
if( cs != m_colorscheme ) {
Refresh();
}
m_colorscheme = cs;
}
开发者ID:libai245,项目名称:wht1,代码行数:14,代码来源:AISTargetQueryDialog.cpp
示例13: RefreshBuffer
void wxJigsawEditorCanvas::RefreshBuffer()
{
do
{
if(!m_DoubleBufferDC.IsOk()) break;
m_DoubleBufferDC.SetBackground(wxBrush(GetBackgroundColour()));
m_DoubleBufferDC.Clear();
if(!m_View) break;
m_DoubleBufferDC.SetFont(GetScaledFont());
m_View->OnDraw(&m_DoubleBufferDC);
}
while(false);
Refresh();
}
开发者ID:cubemoon,项目名称:game-editor,代码行数:14,代码来源:wxJigsawEditorCanvas.cpp
示例14: dc
void wxBitmapComboLabel::OnPaint( wxPaintEvent &WXUNUSED(event) )
{
wxPaintDC dc(this);
dc.SetFont(m_bmpCombo->GetFont());
//dc.SetBackground(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID));
//dc.Clear();
dc.SetBrush(*wxTheBrushList->FindOrCreateBrush(GetBackgroundColour(), wxSOLID));
dc.SetPen(*wxTRANSPARENT_PEN);
dc.DrawRectangle(wxRect(wxPoint(0,0), GetClientSize()));
const int sel = m_bmpCombo->GetSelection();
if ((sel >= 0) && (sel < m_bmpCombo->GetCount()))
m_bmpCombo->DrawItem(dc, sel);
}
开发者ID:Kangar0o,项目名称:gambit,代码行数:14,代码来源:bmpcombo.cpp
示例15: GetSizer
/* SToolBarGroup::addActionButton
* Adds a toolbar button to the group for [action]. If [icon] is
* empty, the action's icon is used
*******************************************************************/
SToolBarButton* SToolBarGroup::addActionButton(string action, string icon, bool show_name)
{
// Get sizer
wxSizer* sizer = GetSizer();
// Create button
SToolBarButton* button = new SToolBarButton(this, action, icon, show_name);
button->SetBackgroundColour(GetBackgroundColour());
// Add it to the group
sizer->Add(button, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1);
return button;
}
开发者ID:Blzut3,项目名称:SLADE,代码行数:18,代码来源:SToolBar.cpp
示例16: GetBackgroundColour
void NassiDiagramWindow::PaintBackground(wxDC &dc)
{
wxColour backgroundColour = GetBackgroundColour();
if ( !backgroundColour.Ok())
backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
dc.SetBrush(wxBrush(backgroundColour));
dc.SetPen(wxPen(backgroundColour, 1));
wxRect windowRect(wxPoint(0,0), GetClientSize());
CalcUnscrolledPosition(windowRect.x, windowRect.y, &windowRect.x, &windowRect.y);
dc.DrawRectangle(windowRect);
dc.SetBrush(wxNullBrush);
dc.SetPen(wxNullPen);
}
开发者ID:simple-codeblocks,项目名称:Codeblocks,代码行数:14,代码来源:NassiDiagramWindow.cpp
示例17: wxUnknownControlContainer
wxUnknownControlContainer(wxWindow *parent,
const wxString& controlName,
wxWindowID id = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0)
// Always add the wxTAB_TRAVERSAL and wxNO_BORDER styles to what comes
// from the XRC if anything.
: wxPanel(parent, id, pos, size, style | wxTAB_TRAVERSAL | wxNO_BORDER,
controlName + wxT("_container")),
m_controlName(controlName), m_controlAdded(false)
{
m_bg = GetBackgroundColour();
SetBackgroundColour(wxColour(255, 0, 255));
}
开发者ID:AmbientMalice,项目名称:pcsx2,代码行数:15,代码来源:xh_unkwn.cpp
示例18: GetVirtualSize
void wxlCan::Render( wxDC& dc )
{
int w,h;
GetVirtualSize( &w, &h );
dc.SetBackground( GetBackgroundColour() );
dc.Clear();
dc.SetBrush(m_backbrush);
dc.SetPen( *wxTRANSPARENT_PEN );
dc.DrawRectangle( 0, 0, w, h );
//draw objects
m_rootobject.Draw( dc, 0, 0 );
}
开发者ID:Abyss116,项目名称:luaplus51-all,代码行数:15,代码来源:canlua.cpp
示例19: GetClientSize
void wxAnimationCtrl::ClearToBackgroundColour()
{
wxSize sz = GetClientSize();
GdkPixbuf *newpix = gdk_pixbuf_new(GDK_COLORSPACE_RGB, false, 8,
sz.GetWidth(), sz.GetHeight());
if (!newpix)
return;
wxColour clr = GetBackgroundColour();
guint32 col = (clr.Red() << 24) | (clr.Green() << 16) | (clr.Blue() << 8);
gdk_pixbuf_fill(newpix, col);
gtk_image_set_from_pixbuf(GTK_IMAGE(m_widget), newpix);
g_object_unref(newpix);
}
开发者ID:Bluehorn,项目名称:wxPython,代码行数:15,代码来源:animate.cpp
示例20: onPaint
void onPaint(wxPaintEvent& e)
{
wxPaintDC dc(this);
// Get system colours needed
wxColour col_background = GetBackgroundColour();//toolbar_win10 ? *wxWHITE : Drawing::getPanelBGColour();
wxColour col_light = Drawing::lightColour(col_background, 1.5f);
wxColour col_dark = Drawing::darkColour(col_background, 1.5f);
// Draw lines
//dc.SetPen(wxPen(col_dark));
//dc.DrawLine(wxPoint(0, 0), wxPoint(GetSize().x+1, 0));
//dc.SetPen(wxPen(col_light));
//dc.DrawLine(wxPoint(0, 1), wxPoint(GetSize().x+1, 1));
}
开发者ID:Blzut3,项目名称:SLADE,代码行数:15,代码来源:SToolBar.cpp
注:本文中的GetBackgroundColour函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论