Motif things.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2883 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -164,18 +164,11 @@ bool MyApp::OnInit()
|
||||
|
||||
frame->SetIcon( wxICON(mondrian) );
|
||||
|
||||
// submenu
|
||||
wxMenu *sub_menu = new wxMenu( wxMENU_TEAROFF );
|
||||
sub_menu->Append(MINIMAL_ABOUT, "&About", "About this sample");
|
||||
sub_menu->Append(MINIMAL_ABOUT, "&About", "About this sample");
|
||||
sub_menu->Append(MINIMAL_ABOUT, "&About", "About this sample");
|
||||
|
||||
wxMenu *file_menu = new wxMenu;
|
||||
file_menu->Append(MINIMAL_ABOUT, "&About\tF1");
|
||||
file_menu->Append(MINIMAL_QUIT, "E&xit\tAlt-X", "Quit controls sample");
|
||||
file_menu->Append( 0, "&Submenu", sub_menu );
|
||||
|
||||
wxMenuBar *menu_bar = new wxMenuBar( wxMB_DOCKABLE );
|
||||
wxMenuBar *menu_bar = new wxMenuBar;
|
||||
menu_bar->Append(file_menu, "&File");
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
|
@@ -1180,8 +1180,8 @@ void wxWindowDC::GetTextExtent( const wxString &string, long *width, long *heigh
|
||||
// TODO: this should be an error log function
|
||||
wxFAIL_MSG("set a valid font before calling GetTextExtent!");
|
||||
|
||||
*width = -1;
|
||||
*height = -1;
|
||||
if (width) *width = -1;
|
||||
if (height) *height = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1207,8 +1207,8 @@ void wxWindowDC::GetTextExtent( const wxString &string, long *width, long *heigh
|
||||
XTextExtents((XFontStruct*) pFontStruct, (char*) (const char*) string, slen, &direction,
|
||||
&ascent, &descent2, &overall);
|
||||
|
||||
*width = XDEV2LOGREL (overall.width);
|
||||
*height = YDEV2LOGREL (ascent + descent2);
|
||||
if (width) *width = XDEV2LOGREL (overall.width);
|
||||
if (height) *height = YDEV2LOGREL (ascent + descent2);
|
||||
if (descent)
|
||||
*descent = descent2;
|
||||
if (externalLeading)
|
||||
@@ -1992,7 +1992,7 @@ void wxWindowDC::SetDCClipping()
|
||||
|
||||
void wxWindowDC::DoSetClippingRegion( long x, long y, long width, long height )
|
||||
{
|
||||
wxDC::SetClippingRegion( x, y, width, height );
|
||||
wxDC::DoSetClippingRegion( x, y, width, height );
|
||||
|
||||
if (m_userRegion)
|
||||
XDestroyRegion ((Region) m_userRegion);
|
||||
@@ -2023,7 +2023,7 @@ void wxWindowDC::DoSetClippingRegionAsRegion( const wxRegion& region )
|
||||
{
|
||||
wxRect box = region.GetBox();
|
||||
|
||||
wxDC::SetClippingRegion( box.x, box.y, box.width, box.height );
|
||||
wxDC::DoSetClippingRegion( box.x, box.y, box.width, box.height );
|
||||
|
||||
if (m_userRegion)
|
||||
XDestroyRegion ((Region) m_userRegion);
|
||||
|
@@ -36,7 +36,7 @@
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/scrolwin.h"
|
||||
|
||||
#include "wx/module.h"
|
||||
#include "wx/menuitem.h"
|
||||
#include "wx/log.h"
|
||||
|
||||
@@ -68,7 +68,7 @@ static const int SCROLL_MARGIN = 4;
|
||||
// global variables for this module
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
static wxHashTable *gs_wxWidgetHashTable;
|
||||
extern wxHashTable *wxWidgetHashTable;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private functions
|
||||
@@ -1588,26 +1588,26 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
|
||||
bool wxAddWindowToTable(Widget w, wxWindow *win)
|
||||
{
|
||||
wxWindow *oldItem = NULL;
|
||||
if ((oldItem = (wxWindow *)gs_wxWidgetHashTable->Get ((long) w)))
|
||||
if ((oldItem = (wxWindow *)wxWidgetHashTable->Get ((long) w)))
|
||||
{
|
||||
wxLogDebug("Widget table clash: new widget is %ld, %s",
|
||||
(long)w, win->GetClassInfo()->GetClassName());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gs_wxWidgetHashTable->Put((long) w, win);
|
||||
wxWidgetHashTable->Put((long) w, win);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
wxWindow *wxGetWindowFromTable(Widget w)
|
||||
{
|
||||
return (wxWindow *)gs_wxWidgetHashTable->Get((long) w);
|
||||
return (wxWindow *)wxWidgetHashTable->Get((long) w);
|
||||
}
|
||||
|
||||
void wxDeleteWindowFromTable(Widget w)
|
||||
{
|
||||
gs_wxWidgetHashTable->Delete((long)w);
|
||||
wxWidgetHashTable->Delete((long)w);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user