template <typename procType, typename uppType , uppType (*newUPP)(procType) , void (*disposeUPP)(uppType) > class wxMacUPP
{
public :
- wxMacUPP( procType proc )
+ wxMacUPP( procType WXUNUSED(proc) )
{
m_upp = NULL;
m_upp = (*newUPP)( NULL );
virtual bool HasOwnContextMenu() const
- { return false ; }
+ { return false ; }
- virtual bool SetupCursor( const wxPoint& pt )
- { return false ; }
+ virtual bool SetupCursor( const wxPoint& WXUNUSED(pt) )
+ { return false ; }
virtual void Clear() ;
virtual bool CanUndo() const;
virtual void ShowPosition(long WXUNUSED(pos)) ;
virtual int GetLineLength(long lineNo) const ;
virtual wxString GetLineText(long lineNo) const ;
- virtual void CheckSpelling(bool check) { }
+ virtual void CheckSpelling(bool WXUNUSED(check)) { }
#ifndef __WXMAC_OSX__
virtual void MacControlUserPaneDrawProc(wxInt16 part) = 0 ;
#endif // TARGET_API_MAC_OSX
-#endif // _WX_MAC_PRIVATE_MACTEXT_H_
\ No newline at end of file
+#endif // _WX_MAC_PRIVATE_MACTEXT_H_
PangoContext* GetPangoContext();
#endif
- wxXVisualInfo* GetVisualInfo(WXDisplay* display)
+ wxXVisualInfo* GetVisualInfo(WXDisplay* WXUNUSED(display))
{
// this should be implemented correctly for wxBitmap to work
// with multiple display
return M_BMPDATA->m_bitmap;
}
-void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp)
+void *wxBitmap::GetRawData(wxPixelDataBase& WXUNUSED(data), int WXUNUSED(bpp))
{
return NULL;
}
//-----------------------------------------------------------------------------
extern "C" {
-static void gtk_checkbox_toggled_callback(GtkWidget *widget, wxCheckBox *cb)
+static void gtk_checkbox_toggled_callback(GtkWidget *WXUNUSED(widget),
+ wxCheckBox *cb)
{
if (g_isIdle) wxapp_install_idle_handler();
extern "C" {
static void source_drag_data_delete( GtkWidget *WXUNUSED(widget),
- GdkDragContext *context,
+ GdkDragContext *WXUNUSED(context),
wxDropSource *WXUNUSED(drop_source) )
{
if (g_isIdle)
extern "C" {
static
void _GSocket_GDK_Input(gpointer data,
- gint source,
+ gint WXUNUSED(source),
GdkInputCondition condition)
{
GSocket *socket = (GSocket *)data;
//-----------------------------------------------------------------------------
extern "C" {
-static gint gtk_listitem_focus_in_callback( GtkWidget *widget,
- GdkEvent *WXUNUSED(event),
- wxWindow *win )
+static gint gtk_listitem_focus_in_callback( GtkWidget *WXUNUSED(widget),
+ GdkEvent *WXUNUSED(event),
+ wxWindow *win )
{
if (g_isIdle)
wxapp_install_idle_handler();
//-----------------------------------------------------------------------------
extern "C" {
-static gint gtk_listitem_focus_out_callback( GtkWidget *widget, GdkEventFocus *gdk_event, wxWindowGTK *win )
+static gint gtk_listitem_focus_out_callback( GtkWidget *WXUNUSED(widget),
+ GdkEventFocus *WXUNUSED(gdk_event),
+ wxWindowGTK *win )
{
if (g_isIdle)
wxapp_install_idle_handler();
extern "C" {
static gint
-gtk_listbox_realized_callback( GtkWidget *m_widget, wxListBox *win )
+gtk_listbox_realized_callback( GtkWidget *WXUNUSED(widget), wxListBox *win )
{
if (g_isIdle)
wxapp_install_idle_handler();
Clear();
- if (m_strings)
- delete m_strings;
+ delete m_strings;
}
// ----------------------------------------------------------------------------
bool wxListBox::IsOwnGtkWindow( GdkWindow *window )
{
- return true;
-
-#if 0
- if (m_widget->window == window) return true;
-
- if (GTK_WIDGET(m_list)->window == window) return true;
-
- GList *child = m_list->children;
- while (child)
- {
- GtkWidget *bin = GTK_WIDGET( child->data );
- if (bin->window == window) return true;
- child = child->next;
- }
-
- return false;
-#endif
+ return m_widget->window == window ||
+ GTK_WIDGET(m_list)->window == window;
}
void wxListBox::DoApplyWidgetStyle(GtkRcStyle *style)
extern "C" {
-static void gtk_menu_open_callback( GtkWidget *widget, wxMenu *menu )
+static void gtk_menu_open_callback( GtkWidget *WXUNUSED(widget), wxMenu *menu )
{
wxMenuEvent event(wxEVT_MENU_OPEN, -1, menu);
DoCommonMenuCallbackCode(menu, event);
}
-static void gtk_menu_close_callback( GtkWidget *widget, wxMenuBar *menubar )
+static void gtk_menu_close_callback( GtkWidget *WXUNUSED(widget), wxMenuBar *menubar )
{
if ( !menubar->GetMenuCount() )
{
}
extern "C" {
-static gint gtk_radiobutton_focus_in( GtkWidget *widget,
+static gint gtk_radiobutton_focus_in( GtkWidget *WXUNUSED(widget),
GdkEvent *WXUNUSED(event),
wxRadioBox *win )
{
}
extern "C" {
-static gint gtk_radiobutton_focus_out( GtkWidget *widget,
+static gint gtk_radiobutton_focus_out( GtkWidget *WXUNUSED(widget),
GdkEvent *WXUNUSED(event),
wxRadioBox *win )
{
void
wxRendererGTK::DrawSplitterSash(wxWindow *win,
- wxDC& dc,
+ wxDC& WXUNUSED(dc),
const wxSize& size,
wxCoord position,
wxOrientation orient,
}
void
-wxRendererGTK::DrawDropArrow(wxWindow *win,
+wxRendererGTK::DrawDropArrow(wxWindow *WXUNUSED(win),
wxDC& dc,
const wxRect& rect,
int flags)
}
}
-int wxSystemSettingsNative::GetMetric( wxSystemMetric index, wxWindow* win )
+int
+wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(win))
{
switch (index)
{
return true;
}
-bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *toolBase)
+bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase)
{
wxToolBarTool *tool = (wxToolBarTool *)toolBase;
extern "C" {
static void
gtk_insert_text_callback(GtkEditable *editable,
- const gchar *new_text,
- gint new_text_length,
- gint *position,
+ const gchar *WXUNUSED(new_text),
+ gint WXUNUSED(new_text_length),
+ gint *WXUNUSED(position),
wxTextCtrl *win)
{
if (g_isIdle)
extern "C" {
static void
-gtk_text_changed_callback( GtkWidget *widget, wxTextCtrl *win )
+gtk_text_changed_callback( GtkWidget *WXUNUSED(widget), wxTextCtrl *win )
{
if ( win->IgnoreTextUpdate() )
return;
// wxGTK-specific: called recursively by Enable,
// to give widgets an oppprtunity to correct their colours after they
// have been changed by Enable
-void wxTextCtrl::OnEnabled( bool enable )
+void wxTextCtrl::OnEnabled( bool WXUNUSED(enable) )
{
if ( IsSingleLine() )
return;
//-----------------------------------------------------------------------------
extern "C" {
-static gint gtk_frame_focus_out_callback( GtkWidget *widget,
+static gint gtk_frame_focus_out_callback( GtkWidget *WXUNUSED(widget),
GdkEventFocus *WXUNUSED(gdk_event),
- wxTopLevelWindowGTK *win )
+ wxTopLevelWindowGTK *WXUNUSED(win) )
{
if (g_isIdle)
wxapp_install_idle_handler();
// frame state: maximized/iconized/normal
// ----------------------------------------------------------------------------
-void wxTopLevelWindowGTK::Maximize(bool maximize)
+void wxTopLevelWindowGTK::Maximize(bool WXUNUSED(maximize))
{
wxFAIL_MSG( _T("not implemented") );
}
// make it extern because wxStaticText needs to disconnect this one
extern "C" {
-void wxgtk_window_size_request_callback(GtkWidget *widget,
+void wxgtk_window_size_request_callback(GtkWidget *WXUNUSED(widget),
GtkRequisition *requisition,
wxWindow *win)
{
extern "C" {
static
-void wxgtk_combo_size_request_callback(GtkWidget *widget,
+void wxgtk_combo_size_request_callback(GtkWidget *WXUNUSED(widget),
GtkRequisition *requisition,
wxComboBox *win)
{
//-----------------------------------------------------------------------------
extern "C" {
-static int gtk_window_expose_callback( GtkWidget *widget,
+static int gtk_window_expose_callback( GtkWidget *WXUNUSED(widget),
GdkEventExpose *gdk_event,
wxWindow *win )
{
//-----------------------------------------------------------------------------
extern "C" {
-static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEventFocus *gdk_event, wxWindowGTK *win )
+static gint gtk_window_focus_out_callback( GtkWidget *WXUNUSED(widget),
+ GdkEventFocus *WXUNUSED(gdk_event),
+ wxWindowGTK *win )
{
DEBUG_MAIN_THREAD
extern "C" {
static gint
-gtk_window_realized_callback( GtkWidget *m_widget, wxWindow *win )
+gtk_window_realized_callback( GtkWidget *WXUNUSED(widget), wxWindow *win )
{
DEBUG_MAIN_THREAD
extern "C" {
static
void gtk_wxwindow_size_callback( GtkWidget* WXUNUSED_UNLESS_XIM(widget),
- GtkAllocation* WXUNUSED_UNLESS_XIM(alloc),
+ GtkAllocation* WXUNUSED(alloc),
wxWindowGTK* WXUNUSED_UNLESS_XIM(win) )
{
if (g_isIdle)
#endif
}
-void wxApp::MacOpenURL(const wxString & url )
+void wxApp::MacOpenURL(const wxString & WXUNUSED(url) )
{
}
} ;
static pascal OSStatus
-wxMacAppMenuEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+wxMacAppMenuEventHandler( EventHandlerCallRef WXUNUSED(handler),
+ EventRef event,
+ void *WXUNUSED(data) )
{
wxMacCarbonEvent cEvent( event ) ;
MenuRef menuRef = cEvent.GetParameter<MenuRef>(kEventParamDirectObject) ;
return eventNotHandledErr;
}
-static pascal OSStatus wxMacAppCommandEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+static pascal OSStatus
+wxMacAppCommandEventHandler( EventHandlerCallRef WXUNUSED(handler) ,
+ EventRef event ,
+ void *WXUNUSED(data) )
{
OSStatus result = eventNotHandledErr ;
return result ;
}
-static pascal OSStatus wxMacAppApplicationEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+static pascal OSStatus
+wxMacAppApplicationEventHandler( EventHandlerCallRef WXUNUSED(handler) ,
+ EventRef event ,
+ void *WXUNUSED(data) )
{
OSStatus result = eventNotHandledErr ;
switch ( GetEventKind( event ) )
#ifdef __WXDEBUG__
-pascal static void wxMacAssertOutputHandler(OSType componentSignature, UInt32 options,
- const char *assertionString, const char *exceptionLabelString,
- const char *errorString, const char *fileName, long lineNumber, void *value, ConstStr255Param outputMsg)
+pascal static void
+wxMacAssertOutputHandler(OSType WXUNUSED(componentSignature),
+ UInt32 WXUNUSED(options),
+ const char *assertionString,
+ const char *exceptionLabelString,
+ const char *errorString,
+ const char *fileName,
+ long lineNumber,
+ void *value,
+ ConstStr255Param WXUNUSED(outputMsg))
{
// flow into assert handling
wxString fileNameStr ;
#endif //__WXDEBUG__
#ifdef __WXMAC_OSX__
-extern "C"
-{
- // m_macEventPosted run loop source callback:
- void macPostedEventCallback(void *unused);
-}
-
-void macPostedEventCallback(void *unused)
+extern "C" void macPostedEventCallback(void *WXUNUSED(unused))
{
wxTheApp->ProcessPendingEvents();
}
#endif
}
-void wxApp::OnIdle(wxIdleEvent& event)
+void wxApp::OnIdle(wxIdleEvent& WXUNUSED(event))
{
wxMacProcessNotifierEvents();
}
// virtual
-void wxApp::MacHandleUnhandledEvent( WXEVENTREF evr )
+void wxApp::MacHandleUnhandledEvent( WXEVENTREF WXUNUSED(evr) )
{
// Override to process unhandled events as you please
}
}
#ifdef __WXMAC_OSX__
-void wxMacMemoryBufferReleaseProc(void *info, const void *data, size_t size)
+void wxMacMemoryBufferReleaseProc(void *info, const void *data, size_t WXUNUSED(size))
{
wxMemoryBuffer* membuf = (wxMemoryBuffer*) info ;
IMPLEMENT_DYNAMIC_CLASS(wxPICTResourceHandler, wxBitmapHandler)
-bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap, const wxString& name, long flags,
- int desiredWidth, int desiredHeight)
+bool wxPICTResourceHandler::LoadFile(wxBitmap *bitmap,
+ const wxString& name,
+ long WXUNUSED(flags),
+ int WXUNUSED(desiredWidth),
+ int WXUNUSED(desiredHeight))
{
#if wxUSE_METAFILE
Str255 theName ;
// raw bitmap access support
// ----------------------------------------------------------------------------
-void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp)
+void *wxBitmap::GetRawData(wxPixelDataBase& data, int WXUNUSED(bpp))
{
if ( !Ok() )
// no bitmap, no data (raw or otherwise)
return BeginRawAccess() ;
}
-void wxBitmap::UngetRawData(wxPixelDataBase& dataBase)
+void wxBitmap::UngetRawData(wxPixelDataBase& WXUNUSED(dataBase))
{
EndRawAccess() ;
}
// Bitmap checkbox
bool wxBitmapCheckBox::Create(wxWindow *parent,
wxWindowID id,
- const wxBitmap *label,
- const wxPoint& pos,
- const wxSize& size,
+ const wxBitmap *WXUNUSED(label),
+ const wxPoint& WXUNUSED(pos),
+ const wxSize& WXUNUSED(size),
long style,
const wxValidator& wxVALIDATOR_PARAM(validator),
const wxString& name)
return false;
}
-void wxBitmapCheckBox::SetLabel(const wxBitmap *bitmap)
+void wxBitmapCheckBox::SetLabel(const wxBitmap *WXUNUSED(bitmap))
{
// TODO
wxFAIL_MSG(wxT("wxBitmapCheckBox::SetLabel() not yet implemented"));
wxControl::SetSize( x , y , width , height , sizeFlags ) ;
}
-void wxBitmapCheckBox::SetValue(bool val)
+void wxBitmapCheckBox::SetValue(bool WXUNUSED(val))
{
// TODO
wxFAIL_MSG(wxT("wxBitmapCheckBox::SetValue() not yet implemented"));
- (BOOL)windowShouldClose:(id)sender
{
+ wxUnusedVar(sender);
+
m_bIsClosed = true;
-
+
[NSApp abortModal];
[NSApp stopModal];
return YES;
bool wxColourDialog::Create(wxWindow *parent, wxColourData *data)
{
m_dialogParent = parent;
-
+
if (data)
m_colourData = *data;
// events and window stuff for cocoa for carbon
// applications.
//
- // This is also the only call here that is
+ // This is also the only call here that is
// 10.2+ specific (the rest is OSX only),
// which, ironically, the carbon font
// panel requires.
alpha:1.0]
];
else
- [[NSColorPanel sharedColorPanel] setColor:[NSColor blackColor]];
-
+ [[NSColorPanel sharedColorPanel] setColor:[NSColor blackColor]];
+
//We're done - free up the pool
[thePool release];
-
+
return bOK;
}
int wxColourDialog::ShowModal()
{
- //Start the pool. Required for carbon interaction
+ //Start the pool. Required for carbon interaction
//(For those curious, the only thing that happens
//if you don't do this is a bunch of error
//messages about leaks on the console,
//we can tell if a window has closed/open or not
wxCPWCDelegate* theCPDelegate = [[wxCPWCDelegate alloc] init];
[theColorPanel setDelegate:theCPDelegate];
-
+
//
// Start the color panel modal loop
//
NSModalSession session = [NSApp beginModalSessionForWindow:theColorPanel];
- for (;;)
+ for (;;)
{
[NSApp runModalSession:session];
-
+
//If the color panel is closed, return the font panel modal loop
if ([theCPDelegate isClosed])
break;
}
[NSApp endModalSession:session];
-
+
//free up the memory for the delegates - we don't need them anymore
[theCPDelegate release];
-
+
//Get the shared color panel along with the chosen color and set the chosen color
NSColor* theColor = [[theColorPanel color] colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
-
+
m_colourData.m_dataColour.Set(
(unsigned char) ([theColor redComponent] * 255.0),
(unsigned char) ([theColor greenComponent] * 255.0),
const wxValidator& validator,
const wxString& name)
{
- return Create( parent, id, value, pos, size, 0, NULL,
- style, validator, name );
+ if ( !Create( parent, id, value, pos, size, 0, NULL,
+ style, validator, name ) )
+ return false;
+
+ Append(choices);
+
+ return true;
}
bool wxComboBox::Create(wxWindow *parent,
return GetEventHandler()->ProcessEvent( event );
}
-void wxControl::OnKeyDown( wxKeyEvent &event )
+void wxControl::OnKeyDown( wxKeyEvent &WXUNUSED(event) )
{
if ( m_peer == NULL || !m_peer->Ok() )
return;
// ----------------------------------------------------------------------------
#if wxUSE_UNICODE
-void wxTextDataObject::GetAllFormats( wxDataFormat *formats, wxDataObjectBase::Direction dir ) const
+void wxTextDataObject::GetAllFormats(wxDataFormat *formats,
+ wxDataObjectBase::Direction WXUNUSED(dir)) const
{
*formats++ = wxDataFormat( wxDF_TEXT );
*formats = wxDataFormat( wxDF_UNICODETEXT );
return buffLength + 1;
}
-bool wxFileDataObject::SetData( size_t nSize, const void *pBuf )
+bool wxFileDataObject::SetData( size_t WXUNUSED(nSize), const void *pBuf )
{
wxString filenames;
wxDirDialog::wxDirDialog(wxWindow *parent,
const wxString& message,
const wxString& defaultPath,
- long style,
+ long WXUNUSED(style),
const wxPoint& WXUNUSED(pos),
const wxSize& WXUNUSED(size),
const wxString& WXUNUSED(name))
} ;
-pascal OSStatus wxMacCarbonFontPanelHandler(EventHandlerCallRef nextHandler, EventRef event, void *userData)
+pascal OSStatus
+wxMacCarbonFontPanelHandler(EventHandlerCallRef WXUNUSED(nextHandler),
+ EventRef event,
+ void *userData)
{
OSStatus result = eventNotHandledErr ;
wxFontDialog *fontdialog = (wxFontDialog*) userData ;
{
}
-bool wxFontDialog::Create(wxWindow *parent, const wxFontData& data)
+bool wxFontDialog::Create(wxWindow *WXUNUSED(parent), const wxFontData& data)
{
m_fontData = data;
return true ;
- (IBAction)cancelPressed:(id)sender
{
+ wxUnusedVar(sender);
m_shouldClose = YES ;
[NSApp stopModal];
}
- (IBAction)okPressed:(id)sender
{
+ wxUnusedVar(sender);
m_okPressed = YES ;
m_shouldClose = YES ;
[NSApp stopModal];
extern "C" int RunMixedFontDialog(wxFontDialog* dialog) ;
-int RunMixedFontDialog(wxFontDialog* dialog)
+int RunMixedFontDialog(wxFontDialog* WXUNUSED(dialog))
{
int retval = wxID_CANCEL ;
bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
bool fixedWidthOnly)
{
+ if ( fixedWidthOnly )
+ {
+ wxFAIL_MSG( "enumerating only fixed width fonts not supported" );
+ return false;
+ }
+
//
// From Apple's QA 1471 http://developer.apple.com/qa/qa2006/qa1471.html
//
return true;
}
-bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
+bool wxFontEnumerator::EnumerateEncodings(const wxString& WXUNUSED(family))
{
wxFAIL_MSG(wxT("wxFontEnumerator::EnumerateEncodings() not yet implemented"));
return true;
}
-bool wxTestFontEncoding( const wxNativeEncodingInfo& info )
+bool wxTestFontEncoding( const wxNativeEncodingInfo& WXUNUSED(info) )
{
// basically we should be able to support every encoding via the OS
return true;
virtual void * GetNativePath() const { return m_path; }
// give the native path returned by GetNativePath() back (there might be some deallocations necessary)
- virtual void UnGetNativePath(void *p) const {}
+ virtual void UnGetNativePath(void *WXUNUSED(p)) const {}
// transforms each point of this path by the matrix
virtual void Transform( const wxGraphicsMatrixData* matrix );
return 32;
}
-void wxIcon::SetDepth( int depth )
+void wxIcon::SetDepth( int WXUNUSED(depth) )
{
}
-void wxIcon::SetWidth( int width )
+void wxIcon::SetWidth( int WXUNUSED(width) )
{
}
-void wxIcon::SetHeight( int height )
+void wxIcon::SetHeight( int WXUNUSED(height) )
{
}
IMPLEMENT_DYNAMIC_CLASS(wxICONResourceHandler, wxBitmapHandler)
bool wxICONResourceHandler::LoadFile(
- wxBitmap *bitmap, const wxString& name, long flags,
+ wxBitmap *bitmap, const wxString& name, long WXUNUSED(flags),
int desiredWidth, int desiredHeight )
{
wxIcon icon ;
void wxMacListBoxItem::Notification(wxMacDataItemBrowserControl *owner ,
DataBrowserItemNotification message,
- DataBrowserItemDataRef itemData ) const
+ DataBrowserItemDataRef WXUNUSED(itemData) ) const
{
wxMacDataBrowserListControl *lb = wxDynamicCast(owner,wxMacDataBrowserListControl);
Rect *maxEditTextRect,
Boolean *shrinkToFit);
- static pascal Boolean DataBrowserHitTestProc(ControlRef browser,
- DataBrowserItemID itemID,
- DataBrowserPropertyID property,
- const Rect *theRect,
- const Rect *mouseRect) { return true; }
+ static pascal Boolean DataBrowserHitTestProc(ControlRef WXUNUSED(browser),
+ DataBrowserItemID WXUNUSED(itemID),
+ DataBrowserPropertyID WXUNUSED(property),
+ const Rect *WXUNUSED(theRect),
+ const Rect *WXUNUSED(mouseRect)) { return true; }
virtual bool ConfirmEditText(DataBrowserItemID item,
DataBrowserPropertyID property,
}
// End label editing, optionally cancelling the edit
-bool wxListCtrl::EndEditLabel(bool cancel)
+bool wxListCtrl::EndEditLabel(bool WXUNUSED(cancel))
{
// TODO: generic impl. doesn't have this method - is it needed for us?
if (m_genericImpl)
void wxMacListCtrlItem::Notification(wxMacDataItemBrowserControl *owner ,
DataBrowserItemNotification message,
- DataBrowserItemDataRef itemData ) const
+ DataBrowserItemDataRef WXUNUSED(itemData) ) const
{
wxMacDataBrowserListCtrlControl *lb = wxDynamicCast(owner, wxMacDataBrowserListCtrlControl);
}
bool wxMacDataBrowserListCtrlControl::ConfirmEditText(
- DataBrowserItemID itemID,
- DataBrowserPropertyID property,
- CFStringRef theString,
- Rect *maxEditTextRect,
- Boolean *shrinkToFit)
+ DataBrowserItemID WXUNUSED(itemID),
+ DataBrowserPropertyID WXUNUSED(property),
+ CFStringRef WXUNUSED(theString),
+ Rect *WXUNUSED(maxEditTextRect),
+ Boolean *WXUNUSED(shrinkToFit))
{
return false;
}
DataBrowserItemID itemID,
DataBrowserPropertyID property,
DataBrowserItemState itemState,
- const Rect *itemRect,
+ const Rect *WXUNUSED(itemRect),
SInt16 gdDepth,
Boolean colorDevice)
{
void wxMacDataBrowserListCtrlControl::ItemNotification(DataBrowserItemID itemID,
DataBrowserItemNotification message,
- DataBrowserItemDataRef itemData )
+ DataBrowserItemDataRef WXUNUSED(itemData) )
{
// we want to depend on as little as possible to make sure tear-down of controls is safe
if ( message == kDataBrowserItemRemoved)
}
// Explicitly call default scroll behaviour
-void wxMDIClientWindow::OnScroll(wxScrollEvent& event)
+void wxMDIClientWindow::OnScroll(wxScrollEvent& WXUNUSED(event))
{
}
return (WXHMETAFILE) M_METAFILEDATA->m_metafile;
}
-bool wxMetaFile::SetClipboard(int width, int height)
+bool wxMetaFile::SetClipboard(int WXUNUSED(width), int WXUNUSED(height))
{
bool success = true;
const wxString& message,
const wxString& caption,
long style,
- const wxPoint& pos)
+ const wxPoint& WXUNUSED(pos))
: wxMessageDialogBase(parent, message, caption, style)
{
m_yes = _("Yes");
// wxNotebook accessors
// ----------------------------------------------------------------------------
-void wxNotebook::SetPadding(const wxSize& padding)
+void wxNotebook::SetPadding(const wxSize& WXUNUSED(padding))
{
// unsupported by OS
}
-void wxNotebook::SetTabSize(const wxSize& sz)
+void wxNotebook::SetTabSize(const wxSize& WXUNUSED(sz))
{
// unsupported by OS
}
#endif // wxUSE_CONSTRAINTS
-void wxNotebook::Command(wxCommandEvent& event)
+void wxNotebook::Command(wxCommandEvent& WXUNUSED(event))
{
wxFAIL_MSG(wxT("wxNotebook::Command not implemented"));
}
CGContextSynchronize( m_overlayContext );
}
-void wxOverlayImpl::Clear(wxWindowDC* dc)
+void wxOverlayImpl::Clear(wxWindowDC* WXUNUSED(dc))
{
wxASSERT_MSG( IsOk() , _("You cannot Clear an overlay that is not inited") );
CGRect box = CGRectMake( m_x - 1, m_y - 1 , m_width + 2 , m_height + 2 );
return true ;
}
-void wxMacCarbonPrintData::TransferFrom( wxPageSetupData *data )
+void wxMacCarbonPrintData::TransferFrom( wxPageSetupData *WXUNUSED(data) )
{
// should we setup the page rect here ?
// since MacOS sometimes has two same paper rects with different
return dc;
}
-bool wxMacPrinter::Setup(wxWindow *parent)
+bool wxMacPrinter::Setup(wxWindow *WXUNUSED(parent))
{
#if 0
wxPrintDialog dialog(parent, & m_printDialogData);
//# Information on region
//-----------------------------------------------------------------------------
-bool wxRegion::DoIsEqual(const wxRegion& region) const
+bool wxRegion::DoIsEqual(const wxRegion& WXUNUSED(region)) const
{
wxFAIL_MSG( _T("not implemented") );
*/
OSStatus wxMacRegionToRectsCounterCallback(
- UInt16 message, RgnHandle region, const Rect *rect, void *data )
+ UInt16 message, RgnHandle WXUNUSED(region), const Rect *WXUNUSED(rect), void *data )
{
long *m_numRects = (long*) data ;
if ( message == kQDRegionToRectsMsgInit )
};
OSStatus wxMacRegionToRectsSetterCallback(
- UInt16 message, RgnHandle region, const Rect *rect, void *data )
+ UInt16 message, RgnHandle WXUNUSED(region), const Rect *rect, void *data )
{
if (message == kQDRegionToRectsMsgParse)
{
return m_peer->GetValue();
}
-void wxScrollBar::SetScrollbar( int position, int thumbSize, int range, int pageSize, bool refresh )
+void wxScrollBar::SetScrollbar( int position,
+ int thumbSize,
+ int range,
+ int pageSize,
+ bool WXUNUSED(refresh) )
{
m_pageSize = pageSize;
m_viewSize = thumbSize;
ProcessCommand( event );
}
-void wxScrollBar::MacHandleControlClick( WXWidget control, wxInt16 controlpart, bool mouseStillDown )
+void wxScrollBar::MacHandleControlClick( WXWidget WXUNUSED(control), wxInt16 controlpart, bool mouseStillDown )
{
int position = m_peer->GetValue();
int minPos = m_peer->GetMinimum();
GetEventHandler()->ProcessEvent( event );
}
-wxInt32 wxScrollBar::MacControlHit( WXEVENTHANDLERREF handler, WXEVENTREF mevent )
+wxInt32 wxScrollBar::MacControlHit( WXEVENTHANDLERREF WXUNUSED(handler), WXEVENTREF mevent )
{
int position = m_peer->GetValue();
int minPos = m_peer->GetMinimum();
}
// For trackbars only
-void wxSlider::SetTickFreq(int n, int pos)
+void wxSlider::SetTickFreq(int n, int WXUNUSED(pos))
{
// TODO
m_tickFreq = n;
return 0;
}
-void wxSlider::SetSelection(int minPos, int maxPos)
+void wxSlider::SetSelection(int WXUNUSED(minPos), int WXUNUSED(maxPos))
{
// TODO
}
-void wxSlider::SetThumbLength(int len)
+void wxSlider::SetThumbLength(int WXUNUSED(len))
{
// TODO
}
return 0;
}
-void wxSlider::SetTick(int tickPos)
+void wxSlider::SetTick(int WXUNUSED(tickPos))
{
// TODO
}
ProcessCommand(event);
}
-void wxSlider::MacHandleControlClick( WXWidget control, wxInt16 controlpart, bool mouseStillDown )
+void wxSlider::MacHandleControlClick(WXWidget WXUNUSED(control),
+ wxInt16 WXUNUSED(controlpart),
+ bool WXUNUSED(mouseStillDown))
{
// Whatever the native value is, we may need to invert it for calling
// SetValue and putting the possibly inverted value in the event
GetEventHandler()->ProcessEvent( cevent );
}
-wxInt32 wxSlider::MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF mevent )
+wxInt32 wxSlider::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler),
+ WXEVENTREF WXUNUSED(mevent))
{
// Whatever the native value is, we may need to invert it for calling
// SetValue and putting the possibly inverted value in the event
//
void wxSlider::DoSetSizeHints( int minW, int minH,
int maxW, int maxH,
- int incW, int incH )
+ int WXUNUSED(incW), int WXUNUSED(incH) )
{
wxSize size = GetBestSize();
}
}
-void wxSpinButton::MacHandleControlClick( WXWidget control, wxInt16 controlpart, bool mouseStillDown )
+void wxSpinButton::MacHandleControlClick(WXWidget WXUNUSED(control),
+ wxInt16 controlpart,
+ bool WXUNUSED(mouseStillDown))
{
int nScrollInc = 0;
MacHandleValueChanged( nScrollInc ) ;
}
-wxInt32 wxSpinButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF event )
+wxInt32 wxSpinButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler),
+ WXEVENTREF WXUNUSED(event))
{
#if 0
// these have been handled by the live action proc already
}
protected:
- void OnKillFocus(wxFocusEvent &event)
+ void OnKillFocus(wxFocusEvent& WXUNUSED(event))
{
long l;
if ( !GetValue().ToLong(&l) )
// not a number at all
return;
}
-
+
// is within range
if (l < m_spin->GetMin())
l = m_spin->GetMin();
if (l > m_spin->GetMax())
l = m_spin->GetMax();
-
+
// Update text control
wxString str;
str.Printf( wxT("%d"), (int)l );
if (str != GetValue())
SetValue( str );
-
+
if (l != m_spin->m_oldValue)
{
// set value in spin button
// does that trigger an event?
m_spin->m_btn->SetValue( l );
-
+
// if not
wxCommandEvent event(wxEVT_COMMAND_SPINCTRL_UPDATED, m_spin->GetId());
event.SetEventObject(m_spin);
event.SetInt(l);
m_spin->GetEventHandler()->ProcessEvent(event);
-
+
m_spin->m_oldValue = l;
- }
+ }
}
-
+
void OnTextChange(wxCommandEvent& event)
{
int val;
virtual void SetDescriptiveText(const wxString& text);
virtual wxString GetDescriptiveText() const;
-
+
protected :
virtual void CreateControl( wxTextCtrl* peer, const Rect* bounds, CFStringRef crf );
wxMenu* m_menu;
} ;
-void wxMacSearchFieldControl::CreateControl( wxTextCtrl* /*peer*/, const Rect* bounds, CFStringRef crf )
+void wxMacSearchFieldControl::CreateControl(wxTextCtrl* WXUNUSED(peer),
+ const Rect* bounds,
+ CFStringRef WXUNUSED(crf))
{
OptionBits attributes = 0;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
GetEventTypeCount(eventList), eventList, this,
(EventHandlerRef *)&searchEventHandler);
+ SetValue(value);
+
return true;
}
// 1) To handle wxTaskBarIcon menu events (see below for why)
// 2) To handle events from the dock when it requests a menu
//-----------------------------------------------------------------------------
-pascal OSStatus wxDockEventHandler( EventHandlerCallRef inHandlerCallRef,
- EventRef inEvent, void *pData )
+pascal OSStatus
+wxDockEventHandler(EventHandlerCallRef WXUNUSED(inHandlerCallRef),
+ EventRef inEvent,
+ void *pData)
{
// Get the parameters we want from the event
wxDockTaskBarIcon* pTB = (wxDockTaskBarIcon*) pData;
//
// Sets the icon for the dock CGImage functions and SetApplicationDockTileImage
//-----------------------------------------------------------------------------
-bool wxDockTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& tooltip)
+bool wxDockTaskBarIcon::SetIcon(const wxIcon& icon, const wxString& WXUNUSED(tooltip))
{
// convert the wxIcon into a wxBitmap so we can perform some
// wxBitmap operations with it
{
}
-void wxMacTextControl::SetStyle(long start, long end, const wxTextAttr& style)
+void wxMacTextControl::SetStyle(long WXUNUSED(start),
+ long WXUNUSED(end),
+ const wxTextAttr& WXUNUSED(style))
{
}
return false ;
}
-void wxMacTextControl::SetEditable(bool editable)
+void wxMacTextControl::SetEditable(bool WXUNUSED(editable))
{
}
{
}
-long wxMacTextControl::XYToPosition(long x, long y) const
+long wxMacTextControl::XYToPosition(long WXUNUSED(x), long WXUNUSED(y)) const
{
return 0 ;
}
-bool wxMacTextControl::PositionToXY(long pos, long *x, long *y) const
+bool wxMacTextControl::PositionToXY(long WXUNUSED(pos),
+ long *WXUNUSED(x),
+ long *WXUNUSED(y)) const
{
return false ;
}
return true ;
}
-void wxMacUnicodeTextControl::SetEditable(bool editable)
+void wxMacUnicodeTextControl::SetEditable(bool WXUNUSED(editable))
{
#if 0 // leads to problem because text cannot be selected anymore
SetData<Boolean>( kControlEditTextPart , kControlEditTextLockedTag , (Boolean) !editable ) ;
return frameOptions ;
}
-void wxMacMLTEControl::AdjustCreationAttributes( const wxColour &background, bool visible )
+void wxMacMLTEControl::AdjustCreationAttributes(const wxColour &background,
+ bool WXUNUSED(visible))
{
TXNControlTag iControlTags[] =
{
}
}
-void wxMacMLTEControl::SetFont( const wxFont & font , const wxColour& foreground , long windowStyle )
+void wxMacMLTEControl::SetFont(const wxFont & font,
+ const wxColour& foreground,
+ long WXUNUSED(windowStyle))
{
wxMacEditHelper help( m_txn ) ;
TXNSetAttribute( wxTextAttr( foreground, wxNullColour, font ), kTXNStartOffset, kTXNEndOffset ) ;
MacUpdatePosition() ;
}
-void wxMacMLTEClassicControl::MacControlUserPaneDrawProc(wxInt16 thePart)
+void wxMacMLTEClassicControl::MacControlUserPaneDrawProc(wxInt16 WXUNUSED(thePart))
{
wxTextCtrl* textctrl = (wxTextCtrl*)GetControlReference( m_controlRef );
if ( textctrl == NULL )
return result;
}
-wxInt16 wxMacMLTEClassicControl::MacControlUserPaneTrackingProc( wxInt16 x, wxInt16 y, void* actionProc )
+wxInt16 wxMacMLTEClassicControl::MacControlUserPaneTrackingProc( wxInt16 x, wxInt16 y, void* WXUNUSED(actionProc) )
{
ControlPartCode result = kControlNoPart;
return focusResult;
}
-void wxMacMLTEClassicControl::MacControlUserPaneBackgroundProc( void *info )
+void wxMacMLTEClassicControl::MacControlUserPaneBackgroundProc( void *WXUNUSED(info) )
{
}
EventLoopTimerRef m_timerRef;
};
-static pascal void wxProcessTimer( EventLoopTimerRef theTimer, void *data )
+static pascal void wxProcessTimer( EventLoopTimerRef WXUNUSED(theTimer), void *data )
{
if ( data == NULL )
return;
#endif
};
-static pascal OSStatus wxMacToolBarToolControlEventHandler( EventHandlerCallRef handler, EventRef event, void *data )
+static pascal OSStatus wxMacToolBarToolControlEventHandler( EventHandlerCallRef WXUNUSED(handler), EventRef event, void *data )
{
OSStatus result = eventNotHandledErr;
ControlRef controlRef;
{ kEventClassToolbarItem, kEventToolbarItemPerformAction },
};
-static pascal OSStatus wxMacToolBarCommandEventHandler( EventHandlerCallRef handler, EventRef event, void *data )
+static pascal OSStatus wxMacToolBarCommandEventHandler( EventHandlerCallRef WXUNUSED(handler), EventRef event, void *data )
{
OSStatus result = eventNotHandledErr;
{ kEventClassToolbar, kEventToolbarCreateItemWithIdentifier },
};
-static OSStatus ToolbarDelegateHandler( EventHandlerCallRef inCallRef, EventRef inEvent, void* inUserData )
+static OSStatus ToolbarDelegateHandler(EventHandlerCallRef WXUNUSED(inCallRef),
+ EventRef inEvent,
+ void* WXUNUSED(inUserData))
{
OSStatus result = eventNotHandledErr;
// Not yet needed
#define NEW_CAPTURE_HANDLING 1
-pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+pascal OSStatus
+wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler),
+ EventRef event,
+ void *data)
{
wxTopLevelWindowMac* toplevelWindow = (wxTopLevelWindowMac*) data ;
return result ;
}
-static pascal OSStatus wxMacTopLevelWindowEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+static pascal OSStatus
+wxMacTopLevelWindowEventHandler(EventHandlerCallRef WXUNUSED(handler),
+ EventRef event,
+ void *data)
{
OSStatus result = eventNotHandledErr ;
else
wclass = kPlainWindowClass ; // has a single line border, it will have to do for now
//attr |= kWindowNoShadowAttribute; // turn off the shadow Should we??
- group = GetWindowGroupOfClass( // float above other windows
+ group = GetWindowGroupOfClass( // float above other windows
kFloatingWindowClass) ;
}
else if ( HasFlag( wxCAPTION ) )
if ( HasFlag( wxFRAME_FLOAT_ON_PARENT ) )
group = GetWindowGroupOfClass(kFloatingWindowClass) ;
-
+
attr |= kWindowCompositingAttribute;
#if 0 // wxMAC_USE_CORE_GRAPHICS ; TODO : decide on overall handling of high dpi screens (pixel vs userscale)
attr |= kWindowFrameworkScaledAttribute;
{
WindowDefSpec customWindowDefSpec;
customWindowDefSpec.defType = kWindowDefProcPtr;
- customWindowDefSpec.u.defProc =
+ customWindowDefSpec.u.defProc =
#ifdef __LP64__
(WindowDefUPP) wxShapedMacWindowDef;
#else
verify_noerr( CreateWindowGroup( kWindowGroupAttrMoveTogether | kWindowGroupAttrLayerTogether | kWindowGroupAttrHideOnCollapse, &group ));
verify_noerr( SetWindowGroupParent( group, GetWindowGroup( (WindowRef) m_macWindow )));
verify_noerr( SetWindowGroup( (WindowRef) m_macWindow , group ));
-
+
// the create commands are only for content rect,
// so we have to set the size again as structure bounds
SetWindowBounds( (WindowRef) m_macWindow , kWindowStructureRgn , &theBoundsRect ) ;
}
}
-void wxTopLevelWindowMac::MacActivate( long timestamp , bool inIsActivating )
+void wxTopLevelWindowMac::MacActivate( long timestamp , bool WXUNUSED(inIsActivating) )
{
wxLogTrace(TRACE_ACTIVATE, wxT("TopLevel=%p::MacActivate"), this);
{
if ( MacGetUnifiedAppearance() )
MacSetUnifiedAppearance( !metal ) ;
-
+
MacSetMetalAppearance( metal ) ;
}
}
#if TARGET_API_MAC_OSX
if ( MacGetUnifiedAppearance() )
MacSetUnifiedAppearance( false ) ;
-
+
MacChangeWindowAttributes( set ? kWindowMetalAttribute : kWindowNoAttributes ,
set ? kWindowNoAttributes : kWindowMetalAttribute ) ;
#endif
{
if ( MacGetMetalAppearance() )
MacSetMetalAppearance( false ) ;
-
+
MacChangeWindowAttributes( set ? kWindowUnifiedTitleAndToolbarAttribute : kWindowNoAttributes ,
set ? kWindowNoAttributes : kWindowUnifiedTitleAndToolbarAttribute) ;
-
+
// For some reason, Tiger uses white as the background color for this appearance,
// while most apps using it use the typical striped background. Restore that behavior
- // for wx.
+ // for wx.
// TODO: Determine if we need this on Leopard as well. (should be harmless either way,
// though)
SetBackgroundColour( wxSYS_COLOUR_WINDOW ) ;
DisposePtr( (Ptr)ptr ) ;
}
-void wxTopLevelWindowMac::RequestUserAttention(int flags )
+void wxTopLevelWindowMac::RequestUserAttention(int WXUNUSED(flags))
{
NMRecPtr notificationRequest = (NMRecPtr) NewPtr( sizeof( NMRec) ) ;
static wxMacNMUPP nmupp( wxMacNMResponse );
inRect->left = pt.h;
}
-static SInt32 wxShapedMacWindowGetFeatures(WindowRef window, SInt32 param)
+static SInt32 wxShapedMacWindowGetFeatures(WindowRef WXUNUSED(window), SInt32 param)
{
/*------------------------------------------------------
Define which options your custom window supports.
return wNoHit;
}
-static pascal long wxShapedMacWindowDef(short varCode, WindowRef window, SInt16 message, SInt32 param)
+static pascal long wxShapedMacWindowDef(short WXUNUSED(varCode), WindowRef window, SInt16 message, SInt32 param)
{
switch (message)
{
{
}
-void UMAInitToolbox( UInt16 inMoreMastersCalls, bool isEmbedded )
+void UMAInitToolbox( UInt16 WXUNUSED(inMoreMastersCalls),
+ bool WXUNUSED(isEmbedded) )
{
::InitCursor();
// Check whether this window wants to process messages, e.g. Stop button
// in long calculations.
-bool wxCheckForInterrupt(wxWindow *wnd)
+bool wxCheckForInterrupt(wxWindow *WXUNUSED(wnd))
{
// TODO
return false;
return m_needsFocusRect;
}
-void wxMacControl::VisibilityChanged(bool shown)
+void wxMacControl::VisibilityChanged(bool WXUNUSED(shown))
{
}
DataBrowserItemNotificationUPP gDataBrowserItemNotificationUPP = NULL;
DataBrowserItemCompareUPP gDataBrowserItemCompareUPP = NULL;
-wxMacDataBrowserControl::wxMacDataBrowserControl( wxWindow* peer, const wxPoint& pos, const wxSize& size, long style) : wxMacControl( peer )
+wxMacDataBrowserControl::wxMacDataBrowserControl( wxWindow* peer,
+ const wxPoint& pos,
+ const wxSize& size,
+ long WXUNUSED(style))
+ : wxMacControl( peer )
{
Rect bounds = wxMacGetBoundsForControl( peer, pos, size );
OSStatus err = ::CreateDataBrowserControl(
return m_label;
}
-bool wxMacDataItem::IsLessThan(wxMacDataItemBrowserControl *owner ,
+bool wxMacDataItem::IsLessThan(wxMacDataItemBrowserControl *WXUNUSED(owner) ,
const wxMacDataItem* rhs,
DataBrowserPropertyID sortProperty) const
{
return retval;
}
-OSStatus wxMacDataItem::GetSetData( wxMacDataItemBrowserControl *owner ,
+OSStatus wxMacDataItem::GetSetData( wxMacDataItemBrowserControl *WXUNUSED(owner) ,
DataBrowserPropertyID property,
DataBrowserItemDataRef itemData,
bool changeValue )
return err;
}
-void wxMacDataItem::Notification(wxMacDataItemBrowserControl *owner ,
- DataBrowserItemNotification message,
- DataBrowserItemDataRef itemData ) const
+void wxMacDataItem::Notification(wxMacDataItemBrowserControl *WXUNUSED(owner) ,
+ DataBrowserItemNotification WXUNUSED(message),
+ DataBrowserItemDataRef WXUNUSED(itemData) ) const
{
}
float alpha = 1.0 ;
{
wxWindow* iter = thisWindow ;
- while ( iter )
+ while ( iter )
{
alpha *= (float) iter->GetTransparent()/255.0 ;
if ( iter->IsTopLevel() )
case kEventControlHiliteChanged :
thisWindow->MacHiliteChanged() ;
break ;
-
+
case kEventControlActivate :
case kEventControlDeactivate :
// FIXME: we should have a virtual function for this!
return result ;
}
-static pascal OSStatus wxMacWindowServiceEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+static pascal OSStatus
+wxMacWindowServiceEventHandler(EventHandlerCallRef WXUNUSED(handler),
+ EventRef event,
+ void *data)
{
OSStatus result = eventNotHandledErr ;
On the other hand, it can be useful for some applications to react to uncommitted text (for example,
to update a status display), as long as it does not disrupt the inline input session. Ideally, wx
should add new event types to support advanced text input. For now, I would keep things as they are.
-
+
However, the code that was being used caused additional problems:
UInt32 message = (0 << 8) + ((char)uniChars[pos] );
Since it simply truncated the unichar to the last byte, it ended up causing weird bugs with inline
return result ;
}
-static pascal OSStatus wxMacWindowCommandEventHandler( EventHandlerCallRef handler , EventRef event , void *data )
+static pascal OSStatus
+wxMacWindowCommandEventHandler(EventHandlerCallRef WXUNUSED(handler),
+ EventRef event,
+ void *data)
{
OSStatus result = eventNotHandledErr ;
wxWindowMac* focus = (wxWindowMac*) data ;
m_hScrollBar->Raise() ;
}
-void wxWindowMac::MacPostControlCreate(const wxPoint& pos, const wxSize& size)
+void wxWindowMac::MacPostControlCreate(const wxPoint& WXUNUSED(pos), const wxSize& size)
{
wxASSERT_MSG( m_peer != NULL && m_peer->Ok() , wxT("No valid mac control") ) ;
#endif
// Old-style File Manager Drag & Drop
-void wxWindowMac::DragAcceptFiles(bool accept)
+void wxWindowMac::DragAcceptFiles(bool WXUNUSED(accept))
{
// TODO:
}
// Returns the size of the native control. In the case of the toplevel window
// this is the content area root control
-void wxWindowMac::MacGetPositionAndSizeFromControl(int& x, int& y,
- int& w, int& h) const
+void wxWindowMac::MacGetPositionAndSizeFromControl(int& WXUNUSED(x),
+ int& WXUNUSED(y),
+ int& WXUNUSED(w),
+ int& WXUNUSED(h)) const
{
wxFAIL_MSG( wxT("Not currently supported") ) ;
}
HIGetMousePosition(kHICoordSpaceWindow, window, &hiPoint);
pt.h = hiPoint.x;
pt.v = hiPoint.y;
- #else
+ #else
CGrafPtr savePort ;
Boolean swapped = QDSwapPort( GetWindowPort( window ) , &savePort ) ;
#endif
}
-void wxWindowMac::OnEnabled(bool enabled)
+void wxWindowMac::OnEnabled(bool WXUNUSED(enabled))
{
#if !TARGET_API_MAC_OSX
MacEnabledStateChanged() ;
* we always intersect with the entire window, not only with the client area
*/
-void wxWindowMac::Refresh(bool eraseBack, const wxRect *rect)
+void wxWindowMac::Refresh(bool WXUNUSED(eraseBack), const wxRect *rect)
{
if ( m_peer == NULL )
return ;
}
// Coordinates relative to the window
-void wxWindowMac::WarpPointer(int x_pos, int y_pos)
+void wxWindowMac::WarpPointer(int WXUNUSED(x_pos), int WXUNUSED(y_pos))
{
// We really don't move the mouse programmatically under Mac.
}
return 0;
}
-void wxWindowMac::SetScrollPos(int orient, int pos, bool refresh)
+void wxWindowMac::SetScrollPos(int orient, int pos, bool WXUNUSED(refresh))
{
if ( orient == wxHORIZONTAL )
{
// our own window origin is at leftOrigin/rightOrigin
//
-void wxWindowMac::MacPaintBorders( int leftOrigin , int rightOrigin )
+void wxWindowMac::MacPaintBorders( int WXUNUSED(leftOrigin) , int WXUNUSED(rightOrigin) )
{
if ( IsTopLevel() )
return ;
m_peer->GetRect( &rect ) ;
InsetRect( &rect, -1 , -1 ) ;
-#if wxMAC_USE_CORE_GRAPHICS
+#if wxMAC_USE_CORE_GRAPHICS
{
CGRect cgrect = CGRectMake( rect.left , rect.top , rect.right - rect.left ,
rect.bottom - rect.top ) ;
return cursor.Ok() ;
}
-wxString wxWindowMac::MacGetToolTipString( wxPoint &pt )
+wxString wxWindowMac::MacGetToolTipString( wxPoint &WXUNUSED(pt) )
{
#if wxUSE_TOOLTIPS
if ( m_tooltip )
eventNc.SetEventObject( child );
if ( !child->GetEventHandler()->ProcessEvent( eventNc ) )
{
-#if wxMAC_USE_CORE_GRAPHICS
+#if wxMAC_USE_CORE_GRAPHICS
child->MacPaintBorders(0, 0) ;
#else
{
}
}
-void wxWindowMac::OnPaint( wxPaintEvent & event )
+void wxWindowMac::OnPaint( wxPaintEvent & WXUNUSED(event) )
{
if ( wxTheApp->MacGetCurrentEvent() != NULL && wxTheApp->MacGetCurrentEventHandlerCallRef() != NULL
&& GetBackgroundStyle() != wxBG_STYLE_TRANSPARENT )
(EventRef) wxTheApp->MacGetCurrentEvent() ) ;
}
-void wxWindowMac::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED( mouseStillDown ) )
+void wxWindowMac::MacHandleControlClick(WXWidget WXUNUSED(control),
+ wxInt16 WXUNUSED(controlpart),
+ bool WXUNUSED(mouseStillDown))
{
}
#endif
}
-wxByte wxWindowMac::GetTransparent() const
+wxByte wxWindowMac::GetTransparent() const
{
return m_macAlpha ;
}
// We will store the main loop's reference when Initialize is called
static CFRunLoopRef s_mainRunLoop = NULL;
-void Mac_Socket_Callback(CFSocketRef s, CFSocketCallBackType callbackType,
- CFDataRef address, const void* data, void* info)
+void Mac_Socket_Callback(CFSocketRef WXUNUSED(s), CFSocketCallBackType callbackType,
+ CFDataRef WXUNUSED(address), const void* data, void* info)
{
GSocket* socket = (GSocket*)info;
struct MacGSocketData* macdata;
return 0;
}
-void wxJoystick::SetMovementThreshold(int threshold)
+void wxJoystick::SetMovementThreshold(int WXUNUSED(threshold))
{
}
// 5) Sends the event to the polling window (if any)
// 6) Gets the next event and goes back to (1)
//---------------------------------------------------------------------------
-/*static*/ void wxJoystickThread::HIDCallback(void* target, IOReturn res,
- void* context, void* sender)
+/*static*/ void wxJoystickThread::HIDCallback(void* WXUNUSED(target),
+ IOReturn WXUNUSED(res),
+ void* context,
+ void* WXUNUSED(sender))
{
IOHIDEventStruct hidevent;
AbsoluteTime bogustime = {0,0};
#include <mach/mach.h>
}
-void wxMAC_MachPortEndProcessDetect(CFMachPortRef port, void *data)
+void wxMAC_MachPortEndProcessDetect(CFMachPortRef WXUNUSED(port), void *data)
{
wxEndProcessData *proc_data = (wxEndProcessData*)data;
wxLogDebug(wxT("Process ended"));
Called due to source signal detected by the CFRunLoop.
This is nearly identical to the wxGTK equivalent.
*/
-extern "C" void WXCF_EndProcessDetector(CFSocketRef s, CFSocketCallBackType callbackType, CFDataRef address, void const *data, void *info)
+extern "C" void WXCF_EndProcessDetector(CFSocketRef s,
+ CFSocketCallBackType WXUNUSED(callbackType),
+ CFDataRef WXUNUSED(address),
+ void const *WXUNUSED(data),
+ void *info)
{
wxEndProcessData * const proc_data = static_cast<wxEndProcessData*>(info);
wxWindow::DoSetSize(x, y, width, DoGetBestSize().y, sizeFlags);
}
-wxString wxComboBox::GetValue() const
-{
- char* s = XmTextGetString (GetXmText (this));
- wxString str(s);
- if (s)
- XtFree (s);
- return str;
-}
-
void wxComboBox::SetString(unsigned int n, const wxString& s)
{
wxXmString text(s);
return wxDoFindStringInList( GetXmList( this ), s );
}
-// Clipboard operations
-void wxComboBox::Copy()
-{
- XmTextCopy( GetXmText(this), CurrentTime );
-}
-
-void wxComboBox::Cut()
-{
- XmTextCut( GetXmText(this), CurrentTime );
-}
-
-void wxComboBox::Paste()
-{
- XmTextPaste( GetXmText(this) );
-}
-
void wxComboBox::SetEditable(bool WXUNUSED(editable))
{
// TODO
}
-void wxComboBox::SetInsertionPoint(long pos)
-{
- XmTextSetInsertionPosition( GetXmText(this), (XmTextPosition)pos );
-}
-
-void wxComboBox::SetInsertionPointEnd()
-{
- SetInsertionPoint( GetLastPosition() );
-}
-
-long wxComboBox::GetInsertionPoint() const
-{
- return (long)XmTextGetInsertionPosition( GetXmText(this) );
-}
-
-wxTextPos wxComboBox::GetLastPosition() const
-{
- XmTextPosition pos = XmTextGetLastPosition( GetXmText(this) );
- return (long)pos;
-}
-
-void wxComboBox::Replace(long from, long to, const wxString& value)
-{
- XmTextReplace( GetXmText(this), (XmTextPosition)from, (XmTextPosition)to,
- value.char_str() );
-}
-
-void wxComboBox::Remove(long from, long to)
-{
- SetSelection( from, to );
- XmTextRemove( GetXmText(this) );
-}
-
-void wxComboBox::SetSelection(long from, long to)
-{
- if( to == -1 )
- to = GetLastPosition();
-
- XmTextSetSelection( GetXmText(this), (XmTextPosition)from,
- (XmTextPosition)to, (Time)0 );
-}
-
void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
XmComboBoxCallbackStruct * cbs)
{
return wxWindow::DoGetBestSize();
}
+WXWidget wxComboBox::GetTextWidget() const
+{
+ return (WXWidget)GetXmText(this);
+}
+
#endif // XmVersion >= 2000
#endif // wxUSE_COMBOBOX
}
else
{
- // just get the string from Motif
- char *s = XmTextGetString ((Widget) m_mainWidget);
- if ( s )
- {
- str = s;
- XtFree (s);
- }
- //else: return empty string
+ str = wxTextEntry::GetValue();
if ( m_tempCallbackStruct )
{
SendTextUpdatedEvent();
}
-// Clipboard operations
-void wxTextCtrl::Copy()
-{
- XmTextCopy((Widget) m_mainWidget, CurrentTime);
-}
-
-void wxTextCtrl::Cut()
-{
- XmTextCut((Widget) m_mainWidget, CurrentTime);
-}
-
-void wxTextCtrl::Paste()
-{
- XmTextPaste((Widget) m_mainWidget);
-}
-
-bool wxTextCtrl::CanCopy() const
-{
- // Can copy if there's a selection
- long from, to;
- GetSelection(& from, & to);
- return (from != to) ;
-}
-
-bool wxTextCtrl::CanCut() const
-{
- // Can cut if there's a selection
- long from, to;
- GetSelection(& from, & to);
- return (from != to) && (IsEditable());
-}
-
-bool wxTextCtrl::CanPaste() const
-{
- return IsEditable() ;
-}
-
-// Undo/redo
-void wxTextCtrl::Undo()
-{
- // Not possible in Motif
-}
-
-void wxTextCtrl::Redo()
-{
- // Not possible in Motif
-}
-
-bool wxTextCtrl::CanUndo() const
-{
- // No Undo in Motif
- return false;
-}
-
-bool wxTextCtrl::CanRedo() const
-{
- // No Redo in Motif
- return false;
-}
-
-// If the return values from and to are the same, there is no
-// selection.
-void wxTextCtrl::GetSelection(long* from, long* to) const
-{
- XmTextPosition left, right;
-
- XmTextGetSelectionPosition((Widget) m_mainWidget, & left, & right);
-
- *from = (long) left;
- *to = (long) right;
-}
-
-bool wxTextCtrl::IsEditable() const
-{
- return (XmTextGetEditable((Widget) m_mainWidget) != 0);
-}
-
-void wxTextCtrl::SetEditable(bool editable)
-{
- XmTextSetEditable((Widget) m_mainWidget, (Boolean) editable);
-}
-
-void wxTextCtrl::SetInsertionPoint(long pos)
-{
- XmTextSetInsertionPosition ((Widget) m_mainWidget, (XmTextPosition) pos);
-}
-
-void wxTextCtrl::SetInsertionPointEnd()
-{
- wxTextPos pos = GetLastPosition();
- SetInsertionPoint(pos);
-}
-
-long wxTextCtrl::GetInsertionPoint() const
-{
- return (long) XmTextGetInsertionPosition ((Widget) m_mainWidget);
-}
-
-wxTextPos wxTextCtrl::GetLastPosition() const
-{
- return (long) XmTextGetLastPosition ((Widget) m_mainWidget);
-}
-
-void wxTextCtrl::Replace(long from, long to, const wxString& value)
-{
- XmTextReplace ((Widget) m_mainWidget, (XmTextPosition) from, (XmTextPosition) to,
- value.char_str());
-}
-
-void wxTextCtrl::Remove(long from, long to)
-{
- XmTextSetSelection ((Widget) m_mainWidget, (XmTextPosition) from, (XmTextPosition) to,
- (Time) 0);
- XmTextRemove ((Widget) m_mainWidget);
-}
-
-void wxTextCtrl::SetSelection(long from, long to)
-{
- if( to == -1 )
- to = GetLastPosition();
-
- XmTextSetSelection ((Widget) m_mainWidget, (XmTextPosition) from, (XmTextPosition) to,
- (Time) 0);
-}
-
-void wxTextCtrl::WriteText(const wxString& text)
-{
- long textPosition = GetInsertionPoint() + text.length();
- XmTextInsert ((Widget) m_mainWidget, GetInsertionPoint(),
- text.char_str());
- XtVaSetValues ((Widget) m_mainWidget, XmNcursorPosition, textPosition, NULL);
- SetInsertionPoint(textPosition);
- XmTextShowPosition ((Widget) m_mainWidget, textPosition);
- m_modified = true;
-}
-
-void wxTextCtrl::AppendText(const wxString& text)
-{
- wxTextPos textPosition = GetLastPosition() + text.length();
- XmTextInsert ((Widget) m_mainWidget, GetLastPosition(),
- text.char_str());
- XtVaSetValues ((Widget) m_mainWidget, XmNcursorPosition, textPosition, NULL);
- SetInsertionPoint(textPosition);
- XmTextShowPosition ((Widget) m_mainWidget, textPosition);
- m_modified = true;
-}
-
-void wxTextCtrl::Clear()
-{
- XmTextSetString ((Widget) m_mainWidget, wxMOTIF_STR(""));
- m_modified = false;
-}
-
bool wxTextCtrl::IsModified() const
{
return m_modified;
};
extern "C"
-Bool wxX11ExposePredicate (Display *display, XEvent *xevent, XPointer arg)
+Bool wxX11ExposePredicate (Display *WXUNUSED(display), XEvent *xevent, XPointer arg)
{
wxExposeInfo *info = (wxExposeInfo*) arg;
// This should be redefined in a derived class for
// handling property change events for XAtom IPC.
-bool wxApp::HandlePropertyChange(WXEvent *event)
+bool wxApp::HandlePropertyChange(WXEvent *WXUNUSED(event))
{
// by default do nothing special
// TODO: what to do for X11
#endif
}
-wxCursor::wxCursor(const char bits[], int width, int height,
- int hotSpotX, int hotSpotY,
- const char maskBits[], wxColour *fg, wxColour *bg)
+wxCursor::wxCursor(const char WXUNUSED(bits)[],
+ int WXUNUSED(width), int WXUNUSED(height),
+ int WXUNUSED(hotSpotX), int WXUNUSED(hotSpotY),
+ const char WXUNUSED(maskBits)[],
+ wxColour *WXUNUSED(fg), wxColour *WXUNUSED(bg))
{
wxFAIL_MSG( wxT("wxCursor creation from bits not yet implemented") );
}
#if wxUSE_IMAGE
-wxCursor::wxCursor( const wxImage & image )
+wxCursor::wxCursor( const wxImage & WXUNUSED(image) )
{
wxFAIL_MSG( wxT("wxCursor creation from wxImage not yet implemented") );
}
}
void wxWindowDC::DoDrawPolygon( int n, wxPoint points[],
- wxCoord xoffset, wxCoord yoffset, int fillStyle )
+ wxCoord xoffset, wxCoord yoffset,
+ int WXUNUSED(fillStyle) )
{
wxCHECK_RET( Ok(), wxT("invalid window dc") );
#endif
}
-void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y, double angle )
+void wxWindowDC::DoDrawRotatedText(const wxString& WXUNUSED(text),
+ wxCoord WXUNUSED(x), wxCoord WXUNUSED(y),
+ double WXUNUSED(angle))
{
- // later
+ wxFAIL_MSG( "not implemented" );
}
void wxWindowDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height,
}
}
-void wxWindowDC::SetPalette( const wxPalette& palette )
+void wxWindowDC::SetPalette( const wxPalette& WXUNUSED(palette) )
{
#if 0
if (m_window)
return StartDrawingOnTop( &rect );
}
-bool wxScreenDC::StartDrawingOnTop( wxRect *rectIn )
+bool wxScreenDC::StartDrawingOnTop( wxRect *WXUNUSED(rectIn) )
{
// VZ: should we do the same thing that wxMotif wxScreenDC does here?
-#if 0
- wxRect rect;
- if ( rectIn )
- {
- rect = *rectIn;
- }
- else
- {
- rect.x =
- rect.y = 0;
-
- DoGetSize(&rect.width, &rect.height);
- }
-#endif // 0
-
return true;
}
return false;
}
-bool wxEventLoopImpl::PreProcessEvent(XEvent *event)
+bool wxEventLoopImpl::PreProcessEvent(XEvent *WXUNUSED(event))
{
- // TODO
-#if 0
- HWND hWnd = msg->hwnd;
- wxWindow *wndThis = wxGetWindowFromHWND((WXHWND)hWnd);
-
-
- // try translations first; find the youngest window with a translation
- // table.
- wxWindow *wnd;
- for ( wnd = wndThis; wnd; wnd = wnd->GetParent() )
- {
- if ( wnd->MSWTranslateMessage((WXMSG *)msg) )
- return true;
- }
-
- // Anyone for a non-translation message? Try youngest descendants first.
- for ( wnd = wndThis; wnd; wnd = wnd->GetParent() )
- {
- if ( wnd->MSWProcessMessage((WXMSG *)msg) )
- return true;
- }
-#endif
-
return false;
}
return true;
}
-int wxPalette::GetPixel(unsigned char red, unsigned char green, unsigned char blue) const
+int wxPalette::GetPixel(unsigned char WXUNUSED(red),
+ unsigned char WXUNUSED(green),
+ unsigned char WXUNUSED(blue)) const
{
if ( !m_refData )
return wxNOT_FOUND;
wxString wxReparenter::sm_name;
bool wxReparenter::sm_exactMatch = false;
-static int ErrorHandler(Display* dpy, XErrorEvent* event)
+static int ErrorHandler(Display* WXUNUSED(dpy), XErrorEvent* WXUNUSED(event))
{
Xerror = True;
return False;
// wxTopLevelWindowX11 maximize/minimize
// ----------------------------------------------------------------------------
-void wxTopLevelWindowX11::Maximize(bool maximize)
+void wxTopLevelWindowX11::Maximize(bool WXUNUSED(maximize))
{
// TODO
}
void wxTopLevelWindowX11::Iconize(bool iconize)
{
+ if ( !iconize )
+ {
+ Restore();
+ return;
+ }
+
if (!m_iconized && GetMainWindow())
{
if (XIconifyWindow(wxGlobalDisplay(),
// ??
}
-bool wxCheckForInterrupt(wxWindow *wnd)
+bool wxCheckForInterrupt(wxWindow *WXUNUSED(wnd))
{
wxFAIL_MSG(wxT("wxCheckForInterrupt not yet implemented."));
return false;
// TranslateXXXEvent() functions
// ----------------------------------------------------------------------------
-bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win, Window window, XEvent *xevent)
+bool wxTranslateMouseEvent(wxMouseEvent& wxevent,
+ wxWindow *win,
+ Window WXUNUSED(window),
+ XEvent *xevent)
{
switch (XEventGetType(xevent))
{
// position.
wxWindow* wxFindWindowAtPointer(wxPoint& pt)
{
- return wxFindWindowAtPoint(wxGetMousePosition());
+ pt = wxGetMousePosition();
+ return wxFindWindowAtPoint(pt);
}
void wxGetMouseState(int& rootX, int& rootY, unsigned& maskReturn)