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


C++ SetIcons函数代码示例

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


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

示例1: gdk_window_set_decorations

void wxTopLevelWindowGTK::GTKHandleRealized()
{
    wxNonOwnedWindow::GTKHandleRealized();

    gdk_window_set_decorations(gtk_widget_get_window(m_widget),
                               (GdkWMDecoration)m_gdkDecor);
    gdk_window_set_functions(gtk_widget_get_window(m_widget),
                               (GdkWMFunction)m_gdkFunc);

    // GTK's shrinking/growing policy
    if ( !(m_gdkFunc & GDK_FUNC_RESIZE) )
        gtk_window_set_resizable(GTK_WINDOW(m_widget), FALSE);
#ifndef __WXGTK3__
    else
        gtk_window_set_policy(GTK_WINDOW(m_widget), 1, 1, 1);
#endif

    const wxIconBundle& icons = GetIcons();
    if (icons.GetIconCount())
        SetIcons(icons);

#ifdef __WXGTK3__
    if (gtk_window_get_has_resize_grip(GTK_WINDOW(m_widget)))
    {
        // Grip window can end up obscured, probably due to deferred show.
        // Reset grip to ensure it is visible.
        gtk_window_set_has_resize_grip(GTK_WINDOW(m_widget), false);
        gtk_window_set_has_resize_grip(GTK_WINDOW(m_widget), true);
    }
#endif
}
开发者ID:CobaltBlues,项目名称:wxWidgets,代码行数:31,代码来源:toplevel.cpp

示例2: gtk_widget_get_window

void wxTopLevelWindowGTK::GTKHandleRealized()
{
    wxNonOwnedWindow::GTKHandleRealized();

    GdkWindow* window = gtk_widget_get_window(m_widget);

    gdk_window_set_decorations(window, (GdkWMDecoration)m_gdkDecor);
    gdk_window_set_functions(window, (GdkWMFunction)m_gdkFunc);

    const wxIconBundle& icons = GetIcons();
    if (icons.GetIconCount())
        SetIcons(icons);

    GdkCursor* cursor = g_globalCursor.GetCursor();
    if (wxIsBusy() && !gtk_window_get_modal(GTK_WINDOW(m_widget)))
        cursor = g_busyCursor.GetCursor();

    if (cursor)
        gdk_window_set_cursor(window, cursor);

#ifdef __WXGTK3__
    if (gtk_window_get_has_resize_grip(GTK_WINDOW(m_widget)))
    {
        // Grip window can end up obscured, probably due to deferred show.
        // Reset grip to ensure it is visible.
        gtk_window_set_has_resize_grip(GTK_WINDOW(m_widget), false);
        gtk_window_set_has_resize_grip(GTK_WINDOW(m_widget), true);
    }
#endif
}
开发者ID:raydtang,项目名称:wxWidgets,代码行数:30,代码来源:toplevel.cpp

示例3: wxFrame

PqwxFrame::PqwxFrame(const wxString& title)
  : wxFrame(NULL, wxID_ANY, title), titlePrefix(title), currentEditor(NULL), haveCurrentServer(false)
{
#ifdef __WXMSW__
  SetIcon(wxIcon(_T("Pqwx_appicon")));
#else
  wxIconBundle icons;
  icons.AddIcon(StaticResources::LoadVFSIcon(_T("memory:PqwxFrame/pqwx-appicon-64.png")));
  icons.AddIcon(StaticResources::LoadVFSIcon(_T("memory:PqwxFrame/pqwx-appicon-48.png")));
  icons.AddIcon(StaticResources::LoadVFSIcon(_T("memory:PqwxFrame/pqwx-appicon-32.png")));
  icons.AddIcon(StaticResources::LoadVFSIcon(_T("memory:PqwxFrame/pqwx-appicon-16.png")));
  SetIcons(icons);
#endif

  SetMenuBar(wxXmlResource::Get()->LoadMenuBar(_T("mainmenu")));

  wxSplitterWindow *mainSplitter = new wxSplitterWindow(this, wxID_ANY);

  PushEventHandler(&(::wxGetApp().GetObjectBrowserModel()));
  objectBrowserModelTimer = new wxTimer(&(::wxGetApp().GetObjectBrowserModel()), ObjectBrowserModel::TIMER_MAINTAIN);
  objectBrowserModelTimer->Start(30 * 1000, wxTIMER_CONTINUOUS); // 30 seconds

  objectBrowser = new ObjectBrowser(::wxGetApp().GetObjectBrowserModel(), mainSplitter, Pqwx_ObjectBrowser);
  documentsBook = new DocumentsNotebook(mainSplitter, Pqwx_DocumentsNotebook);
  mainSplitter->SplitVertically(objectBrowser, documentsBook);
  mainSplitter->SetSashGravity(0.2);
  mainSplitter->SetMinimumPaneSize(100);

  LoadFrameGeometry();

  mainSplitter->SetSashPosition(GetSize().GetWidth()/4);
}
开发者ID:araqnid,项目名称:pqwx,代码行数:32,代码来源:pqwx_frame.cpp

示例4: wxFrame

GSFrame::GSFrame( const wxString& title)
	: wxFrame(NULL, wxID_ANY, title, g_Conf->GSWindow.WindowPos)
	, m_timer_UpdateTitle( this )
{
	SetIcons( wxGetApp().GetIconBundle() );
	SetBackgroundColour( *wxBLACK );

	wxStaticText* label = new wxStaticText( this, wxID_ANY, _("GS Output is Disabled!") );
	m_id_OutputDisabled = label->GetId();
	label->SetFont( pxGetFixedFont( 20, wxFONTWEIGHT_BOLD ) );
	label->SetForegroundColour( *wxWHITE );

	AppStatusEvent_OnSettingsApplied();

	GSPanel* gsPanel = new GSPanel( this );
	gsPanel->Show( !EmuConfig.GS.DisableOutput );
	m_id_gspanel = gsPanel->GetId();

	// TODO -- Implement this GS window status window!  Whee.
	// (main concern is retaining proper client window sizes when closing/re-opening the window).
	//m_statusbar = CreateStatusBar( 2 );

	Bind(wxEVT_CLOSE_WINDOW, &GSFrame::OnCloseWindow, this);
	Bind(wxEVT_MOVE, &GSFrame::OnMove, this);
	Bind(wxEVT_SIZE, &GSFrame::OnResize, this);
	Bind(wxEVT_ACTIVATE, &GSFrame::OnActivate, this);

	Bind(wxEVT_TIMER, &GSFrame::OnUpdateTitle, this, m_timer_UpdateTitle.GetId());
}
开发者ID:jerrys123111,项目名称:pcsx2,代码行数:29,代码来源:FrameForGS.cpp

示例5: ViewerActionUIToggle

AnimationReversePlayActionUI::AnimationReversePlayActionUI(ViewerActionLogic *L) :
    ViewerActionUIToggle(L)
{
    SetAllText(tr("Reverse play"));
    SetToolTip(tr("Play animation in reverse"));
    if (!GetViewerProperties()->GetNowin())
        SetIcons(QPixmap(animationreverseplayon_xpm), QPixmap(animationreverseplayoff_xpm));
}
开发者ID:burlen,项目名称:visit_vtk_7_src,代码行数:8,代码来源:AnimationActionsUI.C

示例6: SetIcons

void wxTopLevelWindowBase::SetIcon(const wxIcon& icon)
{
    // passing wxNullIcon to SetIcon() is possible (it means that we shouldn't
    // have any icon), but adding an invalid icon to wxIconBundle is not
    wxIconBundle icons;
    if ( icon.IsOk() )
        icons.AddIcon(icon);

    SetIcons(icons);
}
开发者ID:mark711,项目名称:Cafu,代码行数:10,代码来源:toplvcmn.cpp

示例7: WXUNUSED

// Create: builds the GUI components.
bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
                             const wxString& WXUNUSED(title), int style
#if wxUSE_CONFIG
                             , wxConfigBase *config, const wxString& rootpath
#endif // wxUSE_CONFIG
                            )
{
    m_HtmlHelpWin = new wxHtmlHelpWindow(m_Data);
    m_HtmlHelpWin->SetController(m_helpController);
#if wxUSE_CONFIG
    if ( config )
        m_HtmlHelpWin->UseConfig(config, rootpath);
#endif // wxUSE_CONFIG

    wxFrame::Create(parent, id, _("Help"),
                    wxPoint(m_HtmlHelpWin->GetCfgData().x, m_HtmlHelpWin->GetCfgData().y),
                    wxSize(m_HtmlHelpWin->GetCfgData().w, m_HtmlHelpWin->GetCfgData().h),
                    wxDEFAULT_FRAME_STYLE, wxT("wxHtmlHelp"));
#if wxUSE_STATUSBAR
    CreateStatusBar();
#endif
    m_HtmlHelpWin->Create(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
                          wxTAB_TRAVERSAL|wxNO_BORDER, style);

    GetPosition(& (m_HtmlHelpWin->GetCfgData().x), & (m_HtmlHelpWin->GetCfgData()).y);

    SetIcons(wxArtProvider::GetIconBundle(wxART_HELP, wxART_FRAME_ICON));

    // On the Mac, each modeless frame must have a menubar.
    // TODO: add more menu items, and perhaps add a style to show
    // the menubar: compulsory on the Mac, optional elsewhere.
#ifdef __WXMAC__
    wxMenuBar* menuBar = new wxMenuBar;

    wxMenu* fileMenu = new wxMenu;
    fileMenu->Append(wxID_HTML_OPENFILE, _("&Open..."));
    fileMenu->AppendSeparator();
    fileMenu->Append(wxID_CLOSE, _("&Close"));

    wxMenu* helpMenu = new wxMenu;
    helpMenu->Append(wxID_ABOUT, _("&About"));
    // Ensures we don't get an empty help menu
    helpMenu->Append(wxID_HELP_CONTENTS, _("&About"));

    menuBar->Append(fileMenu,_("&File"));
    menuBar->Append(helpMenu,_("&Help"));
    SetMenuBar(menuBar);
#endif

    m_HtmlHelpWin->GetHtmlWindow()->SetRelatedFrame(this, m_TitleFormat);
#if wxUSE_STATUSBAR
    m_HtmlHelpWin->GetHtmlWindow()->SetRelatedStatusBar(0);
#endif
    return true;
}
开发者ID:Teodorrrro,项目名称:wxWidgets,代码行数:56,代码来源:helpfrm.cpp

示例8: wxDialog

CreditsDialog::CreditsDialog(wxWindow* parent,wxString title,int whichIcon) : wxDialog(parent,-1,title,wxDefaultPosition,
			wxDefaultSize,wxDEFAULT_DIALOG_STYLE|wxFRAME_FLOAT_ON_PARENT)
{
	wxBoxSizer* container = new wxBoxSizer(wxVERTICAL);
	text_ctrl = new wxTextCtrl(this,-1,wxEmptyString,wxDefaultPosition,wxDefaultSize,wxTE_MULTILINE|wxTE_READONLY|wxTE_RICH);
	container->Add(text_ctrl,1,wxEXPAND);

	container->Add(wxDialog::CreateButtonSizer(wxOK));
	SetSizer(container);
	wxIcon icon = getIcon( whichIcon);
	SetIcons(icon);
}
开发者ID:N0U,项目名称:springlobby,代码行数:12,代码来源:customdialogs.cpp

示例9: SetIcons

BOOL CXTPPopupItem::SetIcons(UINT nIDBitmap, COLORREF clrTransparent, int itemIcon)
{
    BOOL bAlphaBitmap = FALSE;

    HBITMAP hBitmap = CXTPImageManagerIcon::LoadBitmapFromResource(MAKEINTRESOURCE(nIDBitmap), &bAlphaBitmap);
    if (!hBitmap)
        return FALSE;

    BOOL res =  SetIcons(hBitmap, clrTransparent, itemIcon, bAlphaBitmap);

    DeleteObject(hBitmap);

    return res;
}
开发者ID:killbug2004,项目名称:ghost2013,代码行数:14,代码来源:XTPPopupItem.cpp

示例10: SetPaintBackgroundType

void CASW_VGUI_Computer_Menu::ASWInit()
{
	SetPaintBackgroundType(0);
	SetPaintBackgroundEnabled(false);
	SetBgColor( Color(0,0,0,0) );
	
	SetAlpha(255);
	SetIcons();
	m_pBlackBar[0]->SetImage("swarm/HUD/ASWHUDBlackBar");
	m_pBlackBar[1]->SetImage("swarm/HUD/ASWHUDBlackBar");

	m_pAccessDeniedLabel->SetAlpha(0);
	m_pInsufficientRightsLabel->SetAlpha(0);
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:14,代码来源:asw_vgui_computer_menu.cpp

示例11: wxFrame

TailFrameBase::TailFrameBase(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
    : wxFrame(parent, id, title, pos, size, style)
{
    if ( !bBitmapLoaded ) {
        // We need to initialise the default bitmap handler
        wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
        wxCB60EInitBitmapResources();
        bBitmapLoaded = true;
    }
    // Set icon(s) to the application/dialog
    wxIconBundle app_icons;
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("16-find"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    {
        wxBitmap iconBmp = wxXmlResource::Get()->LoadBitmap(wxT("[email protected]"));
        wxIcon icn;
        icn.CopyFromBitmap(iconBmp);
        app_icons.AddIcon( icn );
    }
    SetIcons( app_icons );

    
    wxBoxSizer* boxSizer37 = new wxBoxSizer(wxVERTICAL);
    this->SetSizer(boxSizer37);
    
    SetName(wxT("TailFrameBase"));
    SetSize(500,300);
    if (GetSizer()) {
         GetSizer()->Fit(this);
    }
    if(GetParent()) {
        CentreOnParent(wxBOTH);
    } else {
        CentreOnScreen(wxBOTH);
    }
#if wxVERSION_NUMBER >= 2900
    if(!wxPersistenceManager::Get().Find(this)) {
        wxPersistenceManager::Get().RegisterAndRestore(this);
    } else {
        wxPersistenceManager::Get().Restore(this);
    }
#endif
    // Connect events
    this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(TailFrameBase::OnClose), NULL, this);
    
}
开发者ID:huan5765,项目名称:codelite-translate2chinese,代码行数:50,代码来源:TailUI.cpp

示例12: GetBounds

void CASW_VGUI_Computer_Menu::ShowMenu()
{
	// if the computer is locked, don't show the menu, instead show our 'terminal secure' message
	C_ASW_Computer_Area *pArea = m_pHackComputer->GetComputerArea();
	if (!pArea)
		return;

	if (pArea->IsLocked())
	{
		//todo: show labels (+and red background?)
		vgui::GetAnimationController()->RunAnimationCommand(m_pAccessDeniedLabel, "Alpha", 255, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);	
		vgui::GetAnimationController()->RunAnimationCommand(m_pInsufficientRightsLabel, "Alpha", 255, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);			
		int x,y,w,h;
		GetBounds(x,y,w,h);
		vgui::GetAnimationController()->RunAnimationCommand(m_pBlackBar[0], "Alpha", 255, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);	
		vgui::GetAnimationController()->RunAnimationCommand(m_pBlackBar[1], "Alpha", 255, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);	
		vgui::GetAnimationController()->RunAnimationCommand(m_pBlackBar[0], "tall", m_fScale*ASW_BLACK_BAR_HEIGHT, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);	
		vgui::GetAnimationController()->RunAnimationCommand(m_pBlackBar[1], "ypos", h  - m_fScale*ASW_BLACK_BAR_HEIGHT*0.8f, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);
		m_pBlackBar[1]->SetTall(m_fScale*ASW_BLACK_BAR_HEIGHT*0.8f+1);	
		// make sure the background is red
		CASW_VGUI_Computer_Frame* pFrame = dynamic_cast<CASW_VGUI_Computer_Frame*>(GetParent());
		if (pFrame)
			pFrame->SetBackdrop(1);
		CLocalPlayerFilter filter;
		C_BaseEntity::EmitSound( filter, -1 /*SOUND_FROM_LOCAL_PLAYER*/, "ASWComputer.AccessDenied" );
		return;
	}
	// make sure the background is blue
	CASW_VGUI_Computer_Frame* pFrame = dynamic_cast<CASW_VGUI_Computer_Frame*>(GetParent());
	if (pFrame)
		pFrame->SetBackdrop(0);
	SetIcons();
	LayoutMenuOptions();
	// fade them in
	for (int i=0;i<m_iOptions;i++)
	{
		vgui::GetAnimationController()->RunAnimationCommand(m_pMenuLabel[i], "Alpha", 255, 0.2f * i, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);
		vgui::GetAnimationController()->RunAnimationCommand(m_pMenuIcon[i], "Alpha", 255, 0.2f * i, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);
		vgui::GetAnimationController()->RunAnimationCommand(m_pMenuIconShadow[i], "Alpha", 30, 0.2f * i, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);		
	}
	int x,y,w,h;
	GetBounds(x,y,w,h);
	vgui::GetAnimationController()->RunAnimationCommand(m_pBlackBar[0], "Alpha", 255, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);	
	vgui::GetAnimationController()->RunAnimationCommand(m_pBlackBar[1], "Alpha", 255, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);	
	vgui::GetAnimationController()->RunAnimationCommand(m_pBlackBar[0], "tall", m_fScale*ASW_BLACK_BAR_HEIGHT, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);	
	vgui::GetAnimationController()->RunAnimationCommand(m_pBlackBar[1], "ypos", h  - m_fScale*ASW_BLACK_BAR_HEIGHT*0.8f, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);
	m_pBlackBar[1]->SetTall(m_fScale*ASW_BLACK_BAR_HEIGHT*0.8f+1);
	//vgui::GetAnimationController()->RunAnimationCommand(m_pBlackBar[1], "tall", m_fScale*ASW_BLACK_BAR_HEIGHT*0.8f+1, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR);	
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:49,代码来源:asw_vgui_computer_menu.cpp

示例13: SetIcons

void PWUpdaterFrame::CreateControls()
{
    /* icons */
    wxIconBundle icons;
    icons.AddIcon(wxIcon(ruby_16_xpm));
    icons.AddIcon(wxIcon(ruby_32_xpm));
    icons.AddIcon(wxIcon(ruby_48_xpm));
    SetIcons(icons);

    /* menu bar */
    wxMenu *file_menu = new wxMenu;
    file_menu->Append(wxID_EXIT, _("&Quit"), _("Quit this program."));
    wxMenu *view_menu = new wxMenu;
    view_menu->AppendCheckItem(myID_MBAR_VIEW_LOG, _("Log Message\tCTRL+F1"), _("Show or hide the log message."));
    view_menu->AppendSeparator();
    view_menu->Append(wxID_PREFERENCES, _("&Preferences"), _("Modify user configuration."));
    wxMenu *help_menu = new wxMenu;
    help_menu->Append(wxID_ABOUT, _("&About"), _("About this program."));

    wxMenuBar *menuBar = new wxMenuBar;
    menuBar->Append(file_menu, _("&File"));
    menuBar->Append(view_menu, _("&View"));
    menuBar->Append(help_menu, _("&Help"));
    SetMenuBar(menuBar);

    /* tool bar */

    /* status bar */
    wxStatusBar *statBar = new wxStatusBar(this, myID_FRAME_STATUSBAR, wxSTB_DEFAULT_STYLE);
    int stBarWidths[STATBAR_FLD_MAX] = { -1, -3 };
    statBar->SetFieldsCount(STATBAR_FLD_MAX);
    statBar->SetStatusWidths(STATBAR_FLD_MAX, stBarWidths);
    SetStatusBar(statBar);

    /* aui manager & panes */
    _auiMgr.SetManagedWindow(this);
    _auiMgr.SetFlags(_auiMgr.GetFlags() | wxAUI_MGR_LIVE_RESIZE);

    _auiMgr.AddPane(new LogPane(this),
        wxAuiPaneInfo().Name(PANE_NAME_LOG).Caption(_("Log Window")).
        CloseButton(true).DestroyOnClose(false).MinSize(750, 120).
        Bottom().LeftDockable(false).RightDockable(false).TopDockable(false).
        Hide());
    _auiMgr.AddPane(new DownloadPane(this, myID_PANE_DOWNLOAD),
        wxAuiPaneInfo().Name(PANE_NAME_DOWNLOAD).CaptionVisible(false).
        CenterPane().CloseButton(false).DestroyOnClose(false));

    _auiMgr.Update();
}
开发者ID:mihazet,项目名称:my-test-apps,代码行数:49,代码来源:PWUpdater.cpp

示例14: m_SaveLocation

frmOdaGet::frmOdaGet(wxTopLevelWindow* parent, wxWindowID id, wxString SaveLocation)
 : m_SaveLocation(SaveLocation)
{
    wxXmlResource::Get()->LoadFrame(this, parent, wxT("frmOdaGet"));

    if (parent)
    {
        SetIcons(parent->GetIcons());
    }

    m_HTTPThread = NULL;
    m_FTPThread = NULL;

    m_DownloadURL = XRCCTRL(*this, "m_DownloadURL", wxTextCtrl);
    m_LocationDisplay = XRCCTRL(*this, "m_LocationDisplay", wxTextCtrl);
    m_DownloadGauge = XRCCTRL(*this, "m_DownloadGauge", wxGauge);
}
开发者ID:JohnnyonFlame,项目名称:odamex,代码行数:17,代码来源:frm_odaget.cpp

示例15: SetIcons

wxDropSource::wxDropSource(wxWindow *win,
                           const wxIcon &iconCopy,
                           const wxIcon &iconMove,
                           const wxIcon &iconNone)
{
    m_waiting = true;

    m_iconWindow = (GtkWidget*) NULL;

    m_window = win;
    m_widget = win->m_widget;
    if (win->m_wxwindow) m_widget = win->m_wxwindow;

    m_retValue = wxDragCancel;

    SetIcons(iconCopy, iconMove, iconNone);
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:17,代码来源:dnd.cpp


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