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
ctrl.name.StartsWith(_T("wx"), &(ctrl.name));
ctrl.name.MakeLower();
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);
// take the screenshot
wxBitmap screenshot = Capture(rect);
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<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>
<property name="bg"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<event name="OnUpdateUI"></event>
</object>
<object class="wxMenuItem" expanded="1">
<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>
<property name="checked">0</property>
<property name="enabled">1</property>
<property name="help">Manually specify rectangular regions for the screenshots.</property>
<property name="kind">wxITEM_NORMAL</property>
<property name="label">Regions<Begin></property>
<property name="name">m_menuCapRect</property>
<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="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>
<property name="checked">0</property>
<property name="enabled">0</property>
<property name="help">Stop manually generating screenshots.</property>
<property name="kind">wxITEM_NORMAL</property>
<property name="label">Regions<End></property>
<property name="name">m_menuEndCapRect</property>
<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>
<property name="shortcut">Ctrl+Alt+E</property>
<property name="unchecked_bitmap"></property>
<event name="OnMenuSelection">OnEndCaptureRect</event>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<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>
<property name="subclass"></property>
<property name="tooltip">wxListCtrl</property>
<property name="window_extra_style"></property>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
-// 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!
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
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 );
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 );
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 );
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 );
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 );
captureMenu->Append( m_menuEndCapRect );
m_menuEndCapRect->Enable( false );
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_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 );
m_listCtrl1->SetToolTip( _("wxListCtrl") );
fgSizer2->Add( m_listCtrl1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 20 );
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
-// 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!
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
wxMenuBar* mbar;
wxMenu* fileMenu;
wxMenu* captureMenu;
wxMenuBar* mbar;
wxMenu* fileMenu;
wxMenu* captureMenu;
+ wxMenuItem* m_menuCapRect;
+ wxMenuItem* m_menuEndCapRect;
wxMenu* helpMenu;
wxNotebook* m_notebook1;
wxPanel* m_panel1;
wxMenu* helpMenu;
wxNotebook* m_notebook1;
wxPanel* m_panel1;
#include "ctrlmaskout.h"
#include "autocapture.h"
#include "ctrlmaskout.h"
#include "autocapture.h"
+#include "bitmaps/play.xpm"
+#include "bitmaps/stop.xpm"
+
// ----------------------------------------------------------------------------
// ScreenshotFrame
// ----------------------------------------------------------------------------
// ScreenshotFrame
m_treeCtrl1->ExpandAll();
// Add items into wxListCtrl
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);
// Check the first item in wxCheckListBox
m_checkList1->Check(0);
// set minimum size hints
GetSizer()->SetSizeHints(this);
// set minimum size hints
GetSizer()->SetSizeHints(this);
+
+ // add bitmaps to the menus
+ m_menuCapRect->SetBitmaps( wxIcon(play_xpm) );
+ m_menuEndCapRect->SetBitmaps( wxIcon(stop_xpm) );