#include "wx/menuitem.h"
#include "wx/log.h"
-#include "wx/listimpl.cpp"
-
#if wxUSE_DRAG_AND_DROP
#include "wx/dnd.h"
#endif
// implementation
// ============================================================================
-// ----------------------------------------------------------------------------
-// list types
-// ----------------------------------------------------------------------------
-
-WX_DEFINE_LIST(wxRectList);
-
// ----------------------------------------------------------------------------
// helper functions
// ----------------------------------------------------------------------------
XtAppAddActions ((XtAppContext) wxTheApp->GetAppContext(), actions, 1);
Widget parentWidget = (Widget) parent->GetClientWidget();
- if (style & wxBORDER)
+
+ if (style & wxSIMPLE_BORDER)
{
m_borderWidget = (WXWidget)XtVaCreateManagedWidget
(
"canvasBorder",
xmFrameWidgetClass, parentWidget,
XmNshadowType, XmSHADOW_IN,
+ XmNshadowThickness, 1,
+ NULL
+ );
+ } else if (style & wxSUNKEN_BORDER)
+ {
+ m_borderWidget = (WXWidget)XtVaCreateManagedWidget
+ (
+ "canvasBorder",
+ xmFrameWidgetClass, parentWidget,
+ XmNshadowType, XmSHADOW_IN,
+ NULL
+ );
+ } else if (style & wxRAISED_BORDER)
+ {
+ m_borderWidget = (WXWidget)XtVaCreateManagedWidget
+ (
+ "canvasBorder",
+ xmFrameWidgetClass, parentWidget,
+ XmNshadowType, XmSHADOW_OUT,
NULL
);
}
}
wxASSERT_MSG( m_cursor.Ok(),
- _T("cursor must be valid after call to the base version"));
+ wxT("cursor must be valid after call to the base version"));
WXDisplay *dpy = GetXDisplay();
WXCursor x_cursor = m_cursor.GetXCursor(dpy);
GetClientSize(& w, & h);
}
+ wxNode *cnode = m_children.First();
+ while (cnode)
+ {
+ wxWindow *child = (wxWindow*) cnode->Data();
+ int sx = 0;
+ int sy = 0;
+ child->GetSize( &sx, &sy );
+ wxPoint pos( child->GetPosition() );
+ child->SetSize( pos.x + dx, pos.y + dy, sx, sy, wxSIZE_ALLOW_MINUS_ONE );
+ cnode = cnode->Next();
+ }
+
int x1 = (dx >= 0) ? x : x - dx;
int y1 = (dy >= 0) ? y : y - dy;
int w1 = w - abs(dx);
}
}
-void wxWindow::OnIdle(wxIdleEvent& event)
+void wxWindow::OnIdle(wxIdleEvent& WXUNUSED(event))
{
// This calls the UI-update mechanism (querying windows for
// menu/toolbar/control state information)
// Try for a menu command
if (frame->GetMenuBar())
{
- wxMenuItem* item = frame->GetMenuBar()->FindItemForId(entry->GetCommand());
+ wxMenuItem* item = frame->GetMenuBar()->FindItem(entry->GetCommand());
if (item)
{
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, entry->GetCommand());
// ----------------------------------------------------------------------------
// Add to hash table, add event handler
-bool wxWindow::AttachWidget (wxWindow* parent, WXWidget mainWidget,
+bool wxWindow::AttachWidget (wxWindow* WXUNUSED(parent), WXWidget mainWidget,
WXWidget formWidget, int x, int y, int width, int height)
{
wxAddWindowToTable((Widget) mainWidget, this);
// All widgets should have this as their resize proc.
// OnSize sent to wxWindow via client data.
-void wxWidgetResizeProc(Widget w, XConfigureEvent *event, String args[], int *num_args)
+void wxWidgetResizeProc(Widget w, XConfigureEvent *WXUNUSED(event), String WXUNUSED(args)[], int *WXUNUSED(num_args))
{
wxWindow *win = wxGetWindowFromTable(w);
if (!win)
// Unable to deal with Enter/Leave without a separate EventHandler (Motif 1.1.4)
static void wxCanvasEnterLeave(Widget drawingArea,
- XtPointer clientData,
+ XtPointer WXUNUSED(clientData),
XCrossingEvent * event)
{
XmDrawingAreaCallbackStruct cbs;
}
// Fix to make it work under Motif 1.0 (!)
-static void wxCanvasMotionEvent (Widget drawingArea, XButtonEvent * event)
+static void wxCanvasMotionEvent (Widget WXUNUSED(drawingArea), XButtonEvent * WXUNUSED(event))
{
#if XmVersion <= 1000
XmDrawingAreaCallbackStruct cbs;
}
static void wxCanvasInputEvent(Widget drawingArea,
- XtPointer data,
+ XtPointer WXUNUSED(data),
XmDrawingAreaCallbackStruct * cbs)
{
wxWindow *canvas = wxGetWindowFromTable(drawingArea);
}
static void wxPanelItemEventHandler(Widget wid,
- XtPointer client_data,
+ XtPointer WXUNUSED(client_data),
XEvent* event,
Boolean *continueToDispatch)
{
return FALSE;
}
-bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, Widget widget, XEvent *xevent)
+bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win, Widget WXUNUSED(widget), XEvent *xevent)
{
switch (xevent->xany.type)
{