fix the menu item bitmaps for wxMSW;
fix the name of the screenshot generated for wxHyperlinkCtrl on platforms != wxGTK git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56231 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -166,6 +166,10 @@ wxBitmap AutoCaptureMechanism::Capture(Control& ctrl)
|
||||
ctrl.name.StartsWith(_T("wx"), &(ctrl.name));
|
||||
ctrl.name.MakeLower();
|
||||
|
||||
// AD-HOC FIX for wxHyperlink
|
||||
if (ctrl.name == "generichyperlinkctrl")
|
||||
ctrl.name = "hyperlinkctrl";
|
||||
|
||||
// take the screenshot
|
||||
wxBitmap screenshot = Capture(rect);
|
||||
|
||||
|
@@ -70,7 +70,7 @@
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxMenuBar" expanded="0">
|
||||
<object class="wxMenuBar" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
@@ -172,7 +172,7 @@
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="wxMenuItem" expanded="1">
|
||||
<property name="bitmap">play; Load From Icon Resource [-1; -1]</property>
|
||||
<property name="bitmap">; Load From File</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="help">Manually specify rectangular regions for the screenshots.</property>
|
||||
@@ -180,14 +180,14 @@
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Regions<Begin></property>
|
||||
<property name="name">m_menuCapRect</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="shortcut">Ctrl+Alt+R</property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection">OnCaptureRect</event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
<object class="wxMenuItem" expanded="1">
|
||||
<property name="bitmap">stop; Load From Icon Resource [-1; -1]</property>
|
||||
<property name="bitmap">; Load From Icon Resource [-1; -1]</property>
|
||||
<property name="checked">0</property>
|
||||
<property name="enabled">0</property>
|
||||
<property name="help">Stop manually generating screenshots.</property>
|
||||
@@ -195,7 +195,7 @@
|
||||
<property name="kind">wxITEM_NORMAL</property>
|
||||
<property name="label">Regions<End></property>
|
||||
<property name="name">m_menuEndCapRect</property>
|
||||
<property name="permission">none</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="shortcut">Ctrl+Alt+E</property>
|
||||
<property name="unchecked_bitmap"></property>
|
||||
<event name="OnMenuSelection">OnEndCaptureRect</event>
|
||||
@@ -1589,7 +1589,7 @@
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="style">wxLC_REPORT</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip">wxListCtrl</property>
|
||||
<property name="window_extra_style"></property>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 21 2008)
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
@@ -52,22 +52,10 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons
|
||||
m_menuCapFullScreen = new wxMenuItem( captureMenu, idMenuCapFullScreen, wxString( _("&Full Screen") ) + wxT('\t') + wxT("Ctrl+Alt+F"), _("Takes a screenshot of the entire screen."), wxITEM_NORMAL );
|
||||
captureMenu->Append( m_menuCapFullScreen );
|
||||
|
||||
wxMenuItem* m_menuCapRect;
|
||||
m_menuCapRect = new wxMenuItem( captureMenu, idMenuCapRect, wxString( _("Regions<Begin>") ) + wxT('\t') + wxT("Ctrl+Alt+R"), _("Manually specify rectangular regions for the screenshots."), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuCapRect->SetBitmaps( wxICON( play ) );
|
||||
#elif defined( __WXGTK__ )
|
||||
m_menuCapRect->SetBitmap( wxICON( play ) );
|
||||
#endif
|
||||
captureMenu->Append( m_menuCapRect );
|
||||
|
||||
wxMenuItem* m_menuEndCapRect;
|
||||
m_menuEndCapRect = new wxMenuItem( captureMenu, idMenuEndCapRect, wxString( _("Regions<End>") ) + wxT('\t') + wxT("Ctrl+Alt+E"), _("Stop manually generating screenshots."), wxITEM_NORMAL );
|
||||
#ifdef __WXMSW__
|
||||
m_menuEndCapRect->SetBitmaps( wxICON( stop ) );
|
||||
#elif defined( __WXGTK__ )
|
||||
m_menuEndCapRect->SetBitmap( wxICON( stop ) );
|
||||
#endif
|
||||
captureMenu->Append( m_menuEndCapRect );
|
||||
m_menuEndCapRect->Enable( false );
|
||||
|
||||
@@ -216,7 +204,7 @@ GUIFrame::GUIFrame( wxWindow* parent, wxWindowID id, const wxString& title, cons
|
||||
m_treeCtrl1 = new wxTreeCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER );
|
||||
fgSizer2->Add( m_treeCtrl1, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20 );
|
||||
|
||||
m_listCtrl1 = new wxListCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0|wxSUNKEN_BORDER );
|
||||
m_listCtrl1 = new wxListCtrl( m_panel2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT|wxSUNKEN_BORDER );
|
||||
m_listCtrl1->SetToolTip( _("wxListCtrl") );
|
||||
|
||||
fgSizer2->Add( m_listCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 );
|
||||
|
@@ -1,5 +1,5 @@
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Apr 21 2008)
|
||||
// C++ code generated with wxFormBuilder (version Apr 16 2008)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
@@ -80,6 +80,8 @@ class GUIFrame : public wxFrame
|
||||
wxMenuBar* mbar;
|
||||
wxMenu* fileMenu;
|
||||
wxMenu* captureMenu;
|
||||
wxMenuItem* m_menuCapRect;
|
||||
wxMenuItem* m_menuEndCapRect;
|
||||
wxMenu* helpMenu;
|
||||
wxNotebook* m_notebook1;
|
||||
wxPanel* m_panel1;
|
||||
|
@@ -34,6 +34,9 @@
|
||||
#include "ctrlmaskout.h"
|
||||
#include "autocapture.h"
|
||||
|
||||
#include "bitmaps/play.xpm"
|
||||
#include "bitmaps/stop.xpm"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// ScreenshotFrame
|
||||
@@ -104,8 +107,12 @@ void ScreenshotFrame::InitFBControls()
|
||||
m_treeCtrl1->ExpandAll();
|
||||
|
||||
// Add items into wxListCtrl
|
||||
for(long index = 0; index < 5; index++)
|
||||
m_listCtrl1->InsertItem( index, wxString::Format(_("Item\n(0,%d)"),index));
|
||||
m_listCtrl1->InsertColumn(0, "Names");
|
||||
m_listCtrl1->InsertColumn(1, "Values");
|
||||
for(long index = 0; index < 5; index++) {
|
||||
m_listCtrl1->InsertItem( index, wxString::Format(_("Item%d"),index));
|
||||
m_listCtrl1->SetItem(index, 1, wxString::Format("%d", index));
|
||||
}
|
||||
|
||||
// Check the first item in wxCheckListBox
|
||||
m_checkList1->Check(0);
|
||||
@@ -119,6 +126,10 @@ void ScreenshotFrame::InitFBControls()
|
||||
|
||||
// set minimum size hints
|
||||
GetSizer()->SetSizeHints(this);
|
||||
|
||||
// add bitmaps to the menus
|
||||
m_menuCapRect->SetBitmaps( wxIcon(play_xpm) );
|
||||
m_menuEndCapRect->SetBitmaps( wxIcon(stop_xpm) );
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user