当前位置: 首页>>代码示例>>C++>>正文


C++ SetBackgroundStyle函数代码示例

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


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

示例1: wxGLCanvas

RendererOGL::RendererOGL(MainFrame *parent, wxWindowID id,
						   const wxPoint& pos, const wxSize& size, long style, const wxString& name)
: wxGLCanvas(parent, id, attribList, pos, size, style|wxFULL_REPAINT_ON_RESIZE, name)
{
    m_initialized = false;
    m_parent      = parent;
    m_glList      = 0;
	m_fov         = 28.0f;
    m_zNear       = 20.0f;
    m_zFar        = 1000.0f;
    m_glContext   = NULL;
    m_mouseNewX = m_mouseNewY = m_mouseOldX = m_mouseOldY = 0;
    m_mouseWheel = 0;
    m_mouseLeft = m_mouseRight = false;
    m_restoreTo2D = m_restoreTo3D = false;
    m_filter = 0.1f;
    
    float h = 42.75f;
    float radFov = m_fov * PI / 180.0f;
    float dist = (h/2.0f) / (float)tan(radFov/2.0f);
    m_minZ = -(dist+16);
    
    m_camera3D.Set(0, -2, -300, -30, 30, 0);
    m_camera2D.Set(0, -32.9f, m_minZ, 0, 0, 0);
    m_camera.CopyFrom(m_camera2D);

	SetWinRenderer(parent, this);
#ifdef __WXGTK__
    SetBackgroundStyle(wxBG_STYLE_CUSTOM);
#else
    SetBackgroundStyle(wxBG_STYLE_PAINT);
#endif
}
开发者ID:rtfpessoa,项目名称:dmgboy,代码行数:33,代码来源:RendererOGL.cpp

示例2: DefaultWorkspacePageBase

DefaultWorkspacePage::DefaultWorkspacePage(wxWindow* parent)
    : DefaultWorkspacePageBase(parent)
{
    // Allow the PHP view to accepts folders
    SetBackgroundStyle(wxBG_STYLE_PAINT);
    
    
    wxColour bg = clSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
    m_colours.InitFromColour(bg);
    if(clConfig::Get().Read("UseCustomBaseColour", false)) {
        bg = clConfig::Get().Read("BaseColour", bg);
        m_colours.InitFromColour(bg);
    }
    m_staticText523->SetBackgroundColour(m_colours.GetBgColour());
    m_staticText523->SetForegroundColour(m_colours.GetItemTextColour());
    
    
    SetDropTarget(new clFileOrFolderDropTarget(this));
    m_staticText523->SetBackgroundColour(m_colours.GetBgColour());
    m_staticText523->SetForegroundColour(m_colours.GetItemTextColour());
    SetBackgroundColour(clSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
    m_staticBitmap521->SetDropTarget(new clFileOrFolderDropTarget(this));
    Bind(wxEVT_DND_FOLDER_DROPPED, &DefaultWorkspacePage::OnFolderDropped, this);
    EventNotifier::Get()->Bind(wxEVT_CMD_COLOURS_FONTS_UPDATED, &DefaultWorkspacePage::OnColoursChanged, this);
    Bind(wxEVT_PAINT, &DefaultWorkspacePage::OnPaint, this);
    Bind(wxEVT_ERASE_BACKGROUND, [](wxEraseEvent& e) { wxUnusedVar(e); });
}
开发者ID:eranif,项目名称:codelite,代码行数:27,代码来源:DefaultWorkspacePage.cpp

示例3: wxPanel

        NavBar::NavBar(wxWindow* parent, DocumentViewHolder& documentViewHolder) :
        wxPanel(parent),
        m_documentViewHolder(documentViewHolder),
        m_navPanel(new wxPanel(this, wxID_ANY)),
        m_searchBox(new wxSearchCtrl(this, wxID_ANY)) {
#ifdef __APPLE__
            m_searchBox->SetFont(*wxSMALL_FONT);
            SetBackgroundStyle(wxBG_STYLE_PAINT);
            Bind(wxEVT_PAINT, &NavBar::OnPaint, this);
#endif
            m_searchBox->Bind(wxEVT_COMMAND_TEXT_UPDATED, &NavBar::OnSearchPatternChanged, this);
            
            wxSizer* innerSizer = new wxBoxSizer(wxHORIZONTAL);
            innerSizer->AddSpacer(4);
            innerSizer->Add(m_navPanel, 1, wxEXPAND );
            innerSizer->Add(m_searchBox, 0, wxEXPAND );
#ifdef __APPLE__
            innerSizer->AddSpacer(4);
#endif
            innerSizer->SetItemMinSize(m_searchBox, 200, wxDefaultSize.y);
            
            wxSizer* outerSizer = new wxBoxSizer(wxVERTICAL);
            outerSizer->AddSpacer(2);
            outerSizer->Add(innerSizer, 1, wxEXPAND);
            outerSizer->AddSpacer(2);
            SetSizer(outerSizer);
    }
开发者ID:ericwa,项目名称:TrenchBroom,代码行数:27,代码来源:NavBar.cpp

示例4: wxWindow

// ctor
StatWin::StatWin(wxFrame *frame):
 wxWindow(frame, wxID_ANY, wxPoint(20,20), wxSize(5,5), wxSIMPLE_BORDER)

{
      int x,y;
      GetClientSize(&x, &y);

      m_backBrush = wxBrush(GetGlobalColor(_T("UIBDR")), wxSOLID);

      SetBackgroundColour(GetGlobalColor(_T("UIBDR")));

      SetBackgroundStyle(wxBG_STYLE_CUSTOM);  // on WXMSW, this prevents flashing on color scheme change

      m_rows = 1;

 //   Create the Children

      pPiano = new PianoWin((wxFrame *)this);
      pPiano->SetSize(0, 0, x *6/10, y*1/m_rows);

#ifdef USE_WIFI_CLIENT
      pWiFi = new WiFiStatWin((wxFrame *)this);
      pWiFi->SetSize(x * 6/10, 0, x *4/10, y * 1/m_rows);
#endif

 }
开发者ID:tai-fun,项目名称:OpenCPN,代码行数:27,代码来源:statwin.cpp

示例5: defined

bool wxSplitWindow::Create (wxWindow *parent, wxWindowID id,
                            const wxPoint& pos,
                            const wxSize& size,
                            long style,
                            const wxString& name) {

    // allow TABbing from one window to the other
    style |= wxTAB_TRAVERSAL;

    // we draw our border ourselves to blend the sash with it
    style &= ~wxBORDER_MASK;
    style |= wxBORDER_NONE;

    if (!wxWindow::Create (parent, id, pos, size, style, name)) return false;

    if (size.x >= 0) m_lastSize.x = size.x;
    if (size.y >= 0) m_lastSize.y = size.y;

    m_permitUnsplitAlways = (style & wxSP_PERMIT_UNSPLIT) != 0;

    // FIXME: with this line the background is not erased at all under GTK1,
    //        so temporary avoid it there
#if !defined(__WXGTK__) || defined(__WXGTK20__)
    // don't erase the splitwindow background, it's pointless as we overwrite it anyhow
    SetBackgroundStyle(wxBG_STYLE_CUSTOM);
#endif

    return true;
}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:29,代码来源:splitwindow.cpp

示例6: SetFont

/// Creation
bool InstanceCtrl::Create(wxWindow* parent, InstanceModel *instList, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
{
	m_instList = instList;

	if (!wxScrolledCanvas::Create(parent, id, pos, size, style | wxFULL_REPAINT_ON_RESIZE | wxWANTS_CHARS))
		return false;
		
	SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
	CalculateOverallItemSize();
	m_itemsPerRow = CalculateItemsPerRow();
	m_intended_column = 0;
	
	SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
	SetBackgroundStyle(wxBG_STYLE_CUSTOM);
	DisableKeyboardScrolling();
	ShowScrollbars(wxSHOW_SB_NEVER, wxSHOW_SB_ALWAYS);
	
	// Tell the sizers to use the given or best size
	SetInitialSize(size);
	
	// Create a buffer
	RecreateBuffer(size);
	
	return true;
}
开发者ID:Glought,项目名称:MultiMC4,代码行数:26,代码来源:instancectrl.cpp

示例7: wxPanel

MapGridCtrl::MapGridCtrl(wxWindow* parent, wxSize size, wxWindowID id)
    : wxPanel(parent, id, wxDefaultPosition, size, wxSIMPLE_BORDER | wxFULL_REPAINT_ON_RESIZE)
    , m_async_image(std::bind(&MapGridCtrl::OnGetMapImageAsyncCompleted, this, std::placeholders::_1))
    , m_async_ex(std::bind(&MapGridCtrl::OnGetMapExAsyncCompleted, this, std::placeholders::_1))
    , m_async_ops_count(0)
    , m_selection_follows_mouse(sett().GetMapSelectorFollowsMouse())
    , m_size(0, 0)
    , m_pos(0, 0)
    , m_in_mouse_drag(false)
    , m_mouseover_map(NULL)
    , m_selected_map(NULL)
{
	SetBackgroundStyle(wxBG_STYLE_CUSTOM);
	SetBackgroundColour(*wxLIGHT_GREY);

	m_img_background.Create(MINIMAP_SIZE, MINIMAP_SIZE, false /*don't clear*/);
	wxRect rect(0, 0, MINIMAP_SIZE, MINIMAP_SIZE);
	wxColour color(GetBackgroundColour());
	m_img_background.SetRGB(rect, color.Red(), color.Green(), color.Blue());

	m_img_minimap_alpha = charArr2wxImage(map_select_1_png, sizeof(map_select_1_png));
	m_img_foreground = charArr2wxImage(map_select_2_png, sizeof(map_select_2_png));

	ASSERT_EXCEPTION(m_img_minimap_alpha.HasAlpha(), _T("map_select_1_png must have an alpha channel"));
	ASSERT_EXCEPTION(m_img_foreground.HasAlpha(), _T("map_select_2_png must have an alpha channel"));

	m_img_minimap_loading = wxBitmap(BlendImage(m_img_foreground, m_img_background, false));
}
开发者ID:springlobby,项目名称:springlobby,代码行数:28,代码来源:mapgridctrl.cpp

示例8: wxPopupWindow

/* SCallTip::SCallTip
 * SCallTip class constructor
 *******************************************************************/
SCallTip::SCallTip(wxWindow* parent)
	: wxPopupWindow(parent),
	col_bg(240, 240, 240),
	col_fg(240, 240, 240),
	function(NULL),
	arg_current(-1),
	switch_args(false),
	btn_mouse_over(0),
	buffer(1000, 1000, 32)
{
	font = GetFont();

	Show(false);

#ifndef __WXOSX__
	SetDoubleBuffered(true);
#endif // !__WXOSX__
	SetBackgroundStyle(wxBG_STYLE_PAINT);

	// Bind events
	Bind(wxEVT_PAINT, &SCallTip::onPaint, this);
	Bind(wxEVT_ERASE_BACKGROUND, &SCallTip::onEraseBackground, this);
	Bind(wxEVT_MOTION, &SCallTip::onMouseMove, this);
	Bind(wxEVT_LEFT_DOWN, &SCallTip::onMouseDown, this);
	Bind(wxEVT_SHOW, &SCallTip::onShow, this);
}
开发者ID:Monsterovich,项目名称:SLADE,代码行数:29,代码来源:SCallTip.cpp

示例9: _T

StatWin::StatWin( wxWindow *win )
{

    long wstyle = wxSIMPLE_BORDER | wxFRAME_NO_TASKBAR;
#ifndef __WXMAC__
    wstyle |= wxFRAME_SHAPED;
#endif
#ifdef __WXMAC__
    wstyle |= wxSTAY_ON_TOP;
#endif

    wxDialog::Create( win, wxID_ANY, _T(""), wxPoint( 20, 20 ), wxSize( 5, 5 ), wstyle );

    int x, y;
    GetClientSize( &x, &y );

    m_backBrush = wxBrush( GetGlobalColor( _T("UIBDR") ), wxSOLID );

    SetBackgroundColour( GetGlobalColor( _T("UIBDR") ) );

    SetBackgroundStyle( wxBG_STYLE_CUSTOM ); // on WXMSW, this prevents flashing on color scheme change

    m_rows = 1;

    //   Create the Children

    pPiano = new PianoWin( (wxFrame *) this );

}
开发者ID:Choony,项目名称:OpenCPN,代码行数:29,代码来源:statwin.cpp

示例10: 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,代码来源:ImagePanel.cpp

示例11: TemplateCanvas

LineChartCanvas::LineChartCanvas(wxWindow *parent, TemplateFrame* t_frame,
                                 Project* project, const LineChartStats& lcs_,
                                 LineChartCanvasCallbackInt* lc_canv_cb_,
                                 const wxPoint& pos, const wxSize& size)
: TemplateCanvas(parent, t_frame, project, project->GetHighlightState(), pos,
                 size, false, true),
lcs(lcs_), lc_canv_cb(lc_canv_cb_), summ_avg_circs(4, (GdaCircle*) 0),
y_axis_precision(1)
{
	LOG_MSG("Entering LineChartCanvas::LineChartCanvas");
	shps_orig_xmin = 0;
	shps_orig_ymin = 0;
	shps_orig_xmax = 100;
	shps_orig_ymax = 100;
	UpdateMargins();
	
	use_category_brushes = false;
	
	PopulateCanvas();
	ResizeSelectableShps();
	
	SetBackgroundStyle(wxBG_STYLE_CUSTOM);  // default style
    
    Bind(wxEVT_LEFT_DCLICK, &LineChartCanvas::OnDblClick, this);
    
	LOG_MSG("Exiting LineChartCanvas::LineChartCanvas");
}
开发者ID:GeoDaCenter,项目名称:geoda,代码行数:27,代码来源:LineChartCanvas.cpp

示例12: SetName

void wxRibbonBar::CommonInit(long style)
{
    SetName(wxT("wxRibbonBar"));

    m_flags = style;
    m_tabs_total_width_ideal = 0;
    m_tabs_total_width_minimum = 0;
    m_tab_margin_left = 50;
    m_tab_margin_right = 20;
    if ( m_flags & wxRIBBON_BAR_SHOW_TOGGLE_BUTTON )
        m_tab_margin_right += 20;
    if ( m_flags & wxRIBBON_BAR_SHOW_HELP_BUTTON )
        m_tab_margin_right += 20;
    m_tab_height = 20; // initial guess
    m_tab_scroll_amount = 0;
    m_current_page = -1;
    m_current_hovered_page = -1;
    m_tab_scroll_left_button_state = wxRIBBON_SCROLL_BTN_NORMAL;
    m_tab_scroll_right_button_state = wxRIBBON_SCROLL_BTN_NORMAL;
    m_tab_scroll_buttons_shown = false;
    m_arePanelsShown = true;

    if(m_art == NULL)
    {
        SetArtProvider(new wxRibbonDefaultArtProvider);
    }
    SetBackgroundStyle(wxBG_STYLE_CUSTOM);

    m_toggle_button_hovered = false;
    m_bar_hovered = false;

    m_ribbon_state = wxRIBBON_BAR_PINNED;
}
开发者ID:CustomCardsOnline,项目名称:wxWidgets,代码行数:33,代码来源:bar.cpp

示例13: GetClientSize

bool wxSplitterWindow::Create(wxWindow *parent, wxWindowID id,
                                   const wxPoint& pos,
                                   const wxSize& size,
                                   long style,
                                   const wxString& name)
{
    // allow TABbing from one window to the other
    style |= wxTAB_TRAVERSAL;

    if ( !wxWindow::Create(parent, id, pos, size, style, name) )
        return false;

    m_lastSize = GetClientSize();

    m_permitUnsplitAlways = (style & wxSP_PERMIT_UNSPLIT) != 0;

    // FIXME: with this line the background is not erased at all under GTK1,
    //        so temporary avoid it there
#if !defined(__WXGTK__) || defined(__WXGTK20__)
    // don't erase the splitter background, it's pointless as we overwrite it
    // anyhow
    SetBackgroundStyle(wxBG_STYLE_CUSTOM);
#endif

    return true;
}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:26,代码来源:splitter.cpp

示例14: wxPanel

SliderPanel::SliderPanel(
	wxWindow* parent, MainFrame *myFrame, wxWindowID id, 
	const wxPoint& pos, const wxSize& size, long style)
	: wxPanel(parent, id, pos, size, style)
{ 
	this->myFrame = myFrame;

	SetBackgroundStyle(wxBG_STYLE_CUSTOM);

	// slider
	wxBitmap bmp1 = wxGetBitmapFromMemory(slider_bmp, 
			sizeof(slider_bmp));
	// back
	wxBitmap bmp2 = wxGetBitmapFromMemory(slider_background_bmp, 
			sizeof(slider_background_bmp));
	// slider hover
	wxBitmap bmp3 = wxGetBitmapFromMemory(slider_hover_bmp, 
			sizeof(slider_hover_bmp));

	m_slider = new GSlider(this, wxID_ANY, wxDefaultPosition, wxNO_BORDER, 
			wxT("aaaa"), bmp2, bmp2, bmp1, bmp3, bmp3, bmp3);

	// default value
	SetRange((float)0, (float)100);
	SetValue((float)0);
}
开发者ID:ktd2004,项目名称:imsplayer,代码行数:26,代码来源:SliderPanel.cpp

示例15: wxControl

wxMoldeoLineCtrl::wxMoldeoLineCtrl( wxWindow* parent, wxWindowID id, const int value, const int minvalue, const int maxvalue, const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name  ) :
wxControl( parent, id,  pos, size, style | wxNO_BORDER, validator, name ) {
    m_min = minvalue;
    m_max = maxvalue;
    m_value = value;
    m_bStartDragging = false;
    m_bLeftSizeDragging = false;
    m_bRightSizeDragging = false;
    m_bMovingDragging = false;
    Mx = 0;
    SetBackgroundStyle(wxBG_STYLE_CUSTOM );

    m_pixel_interval = 500;
    m_play_value = 0;
    m_play_in = 0;
    m_max_play_value = m_max * m_pixel_interval;
    m_play_out = m_max_play_value;
    m_render_in = m_play_in;
    m_render_out = m_play_out;

    //m_timer.SetOwner( this, wxMoldeoLineCtrl::MOLDEOLINETIMER_ID);
	//m_timer.Start(30);

    wxSize screenSize = wxGetDisplaySize();
    bitmap = wxBitmap(screenSize.x, screenSize.y);

    wxScreenDC sdc;
    wxMemoryDC mdc;

    wxPoint AP = ClientToScreen(wxPoint(0,0));
    mdc.SelectObject(bitmap);
    mdc.Blit( 0, 0, screenSize.x, screenSize.y, &sdc, AP.x, AP.y);
    mdc.SelectObject(wxNullBitmap);

}
开发者ID:inaes-tic,项目名称:tv-moldeo,代码行数:35,代码来源:wxMoldeoLineCtrl.cpp


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