}
// Get the window with the focus
-wxWindow *wxWindowBase::FindFocus()
+wxWindow *wxWindowBase::DoFindFocus()
{
// TODO Problems:
// (1) Can there be multiple focussed widgets in an application?
int wxWindow::GetScrollRange(int orient) const
{
Widget scrollBar = (Widget)GetScrollbar((wxOrientation)orient);
- wxCHECK_MSG( scrollBar, 0, "no such scrollbar" );
+ // CE scintilla windows don't always have these scrollbars
+ // and it tends to pile up a whole bunch of asserts
+ //wxCHECK_MSG( scrollBar, 0, "no such scrollbar" );
int range = 0;
if (scrollBar)
int wxWindow::GetScrollThumb(int orient) const
{
Widget scrollBar = (Widget)GetScrollbar((wxOrientation)orient);
- wxCHECK_MSG( scrollBar, 0, "no such scrollbar" );
+ //wxCHECK_MSG( scrollBar, 0, "no such scrollbar" );
- int thumb;
- XtVaGetValues(scrollBar, XmNsliderSize, &thumb, NULL);
+ int thumb = 0;
+ if (scrollBar)
+ XtVaGetValues(scrollBar, XmNsliderSize, &thumb, NULL);
return thumb;
}
bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
{
+ if ( x == -1 && y == -1 )
+ {
+ wxPoint mouse = ScreenToClient(wxGetMousePosition());
+ x = mouse.x; y = mouse.y;
+ }
+
Widget widget = (Widget) GetMainWidget();
/* The menuId field seems to be usused, so we'll use it to
// otherwise we don't know how many pixels have been scrolled. We might
// solve this in the future by defining virtual wxWindow functions to get
// the scroll position in pixels. Or, each kind of scrolled window has to
- // implement backing stores itself, using generic wxWindows code.
+ // implement backing stores itself, using generic wxWidgets code.
wxScrolledWindow* scrolledWindow = wxDynamicCast(this, wxScrolledWindow);
if ( scrolledWindow )
{
// ============================================================================
// ----------------------------------------------------------------------------
-// function which maintain the global hash table mapping Widgets to wxWindows
+// function which maintain the global hash table mapping Widgets to wxWidgets
// ----------------------------------------------------------------------------
bool wxAddWindowToTable(Widget w, wxWindow *win)
int x2, y2;
win->GetPosition(&x2, &y2);
- // The button x/y must be translated to wxWindows
+ // The button x/y must be translated to wxWidgets
// window space - the widget might be a label or button,
// within a form.
int dx = 0;