Back to index

plt-scheme  4.2.1
Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
wxWindow Class Reference

#include <Window.h>

Inheritance diagram for wxWindow:
Inheritance graph
[legend]
Collaboration diagram for wxWindow:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 wxWindow (void)
 ~wxWindow (void)
wxWindow_Xintern * GetHandle (void)
wxChildListGetChildren (void)
wxWindowGetGrandParent (void)
wxWindowGetParent (void)
void AddChild (wxWindow *child)
void DestroyChildren (void)
void RemoveChild (wxWindow *child)
virtual char * GetLabel (void)
virtual char * GetName (void)
virtual char * GetTitle (void)
virtual void SetLabel (char *label)
virtual void SetName (char *name)
virtual void SetTitle (char *title)
virtual void Centre (int direction=wxBOTH)
virtual void ClientToScreen (int *x, int *y)
virtual void Configure (int x, int y, int width, int height, int flags)
virtual void GetClientSize (int *width, int *height)
virtual void GetPosition (int *x, int *y)
virtual void GetSize (int *width, int *height)
virtual void GetRefreshSize (int *w, int *h)
virtual void Move (int x, int y)
virtual void ScreenToClient (int *x, int *y)
virtual void SetClientSize (int width, int height)
virtual void SetSize (int x, int y, int width, int height, int flags=wxSIZE_AUTO)
virtual void SetSize (int width, int height)
virtual void GetTextExtent (const char *string, double *x, double *y, double *descent=NULL, double *externalLeading=NULL, wxFont *theFont=NULL, Bool use16bit=FALSE)
virtual wxCursorSetCursor (wxCursor *cursor)
virtual void CreateCaret (int WXUNUSED(w), int WXUNUSED(h))
virtual void CreateCaret (wxBitmap *WXUNUSED(bitmap))
virtual void DestroyCaret (void)
virtual void ShowCaret (Bool WXUNUSED(show))
virtual void SetCaretPos (int WXUNUSED(x), int WXUNUSED(y))
virtual void GetCaretPos (int *WXUNUSED(x), int *WXUNUSED(y))
virtual void EnableScrolling (Bool x, Bool y)
virtual int GetScrollPos (int orient)
virtual int GetScrollRange (int orient)
virtual int GetScrollPage (int orient)
virtual void Scroll (int x_pos, int y_pos)
virtual void SetScrollArea (int hsize, int vsize)
virtual void SetScrollPos (int orient, int pos)
virtual void SetScrollRange (int orient, int range)
virtual void SetScrollPage (int orient, int range)
virtual wxLayoutConstraintsGetConstraints (void)
virtual void SetConstraints (wxLayoutConstraints *constr)
virtual void Layout (void)
virtual void AllowDoubleClick (Bool allow)
virtual void CaptureMouse (void)
virtual void DragAcceptFiles (Bool accept)
virtual void Enable (Bool enable)
virtual void EnablePainting (Bool enable)
virtual void Fit (void)
virtual Bool GetUserEditMode (void)
virtual long GetWindowStyleFlag (void)
virtual void Paint (void)
virtual Bool PopupMenu (wxMenu *menu, double x, double y, Bool for_choice=0, int top_extra=0)
virtual void Refresh (void)
virtual void ReleaseMouse (void)
virtual void SetFocus (void)
virtual Bool WantsFocus (void)
virtual void SetUserEditMode (Bool edit)
virtual Bool Show (Bool show)
virtual void OnChar (wxKeyEvent *event)
virtual void OnCommand (wxWindow *win, wxCommandEvent *event)
virtual void OnEvent (wxMouseEvent *event)
virtual void OnPaint (void)
virtual void OnScroll (wxScrollEvent *event)
virtual Bool PreOnChar (wxWindow *, wxKeyEvent *)
virtual Bool PreOnEvent (wxWindow *, wxMouseEvent *)
wxWindowDCGetDC (void)
void MakeModal (int on)
void InternalEnable (Bool enable, Bool gray=FALSE)
virtual void ChangeToGray (Bool gray)
void ReleaseFocus ()
virtual void ReleaseAllFocus ()
Bool IsGray (void)
Bool IsShown (void)
void SetShown (Bool shown)
void ForEach (void(*foreach)(wxWindow *w, void *data), void *data)
Bool GetsFocus (void)
wxWindow ** GetWinSafeRef ()
wxFontGetFont ()
long GetWindowHandle ()
virtual void OnActivate (Bool WXUNUSED(active))
virtual void OnChangeFocus (wxItem *WXUNUSED(from), wxItem *WXUNUSED(to))
virtual void OnChar (wxKeyEvent *WXUNUSED(event))
virtual Bool OnCharHook (wxKeyEvent *WXUNUSED(event))
virtual Bool OnClose (void)
virtual void OnCommand (wxWindow *WXUNUSED(win), wxCommandEvent *WXUNUSED(event))
virtual void OnDefaultAction (wxItem *WXUNUSED(initiatingItem))
virtual void OnDropFile (char *WXUNUSED(file))
virtual void OnEvent (wxMouseEvent *WXUNUSED(event))
virtual Bool OnFunctionKey (wxKeyEvent *WXUNUSED(event))
virtual void OnKillFocus (void)
virtual void OnLeftClick (int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(keys))
virtual void OnMenuCommand (long WXUNUSED(cmd))
virtual void OnMenuSelect (long WXUNUSED(cmd))
virtual void OnMove (int WXUNUSED(x), int WXUNUSED(y))
virtual void OnRightClick (int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(keys))
virtual void OnScroll (wxScrollEvent *WXUNUSED(event))
virtual void OnSelect (Bool WXUNUSED(select))
virtual void OnSetFocus (void)
virtual void OnSize (int WXUNUSED(width), int WXUNUSED(height))
void install_cleanup ()
voidoperator new (size_t size)
voidoperator new (size_t size, GCPlacement gcp)
voidoperator new (size_t size, void *p)
voidoperator new (size_t size)
voidoperator new (size_t size, GCPlacement gcp)
void operator delete (void *obj)
void operator delete (void *, void *)
void operator delete (void *obj)
voidoperator new[] (size_t size)
voidoperator new[] (size_t size, GCPlacement gcp)
voidoperator new[] (size_t size, void *p)
void operator delete[] (void *obj)
void operator delete[] (void *, void *)

Public Attributes

WXTYPE __type
void__gc_external

Protected Member Functions

void CreateDC (void)
void DestroyDC (void)
void AddEventHandlers (void)
Bool CallPreOnChar (wxWindow *, wxKeyEvent *)
Bool CallPreOnEvent (wxWindow *, wxMouseEvent *)

Static Protected Member Functions

static void FocusChangeCallback (void *, wxWindow **winp, void *on)

Protected Attributes

wxWindow_Xintern * X
wxWindowDCdc
wxWindowparent
wxChildListchildren
wxColourMapcmap
wxCursorcursor
wxFontfont
wxLayoutConstraintsconstraints
int xoff
int yoff
Bool allow_dclicks
Bool captured
Bool drag_accept
Bool painting_enabled
Bool user_edit_mode
long style
wxWindow ** saferef
wxWindowdndTarget
long misc_flags
unsigned long current_state
short internal_disabled
short internal_gray_disabled
long hs_pos
long vs_pos
long hs_page
long vs_page
long hs_width
long vs_width

Friends

void wxXSetBusyCursor (wxWindow *, wxCursor *)
void wxXSetNoCursor (wxWindow *, wxCursor *)

Detailed Description

Definition at line 69 of file Window.h.


Constructor & Destructor Documentation

Definition at line 110 of file Window.cc.

{ 
    __type = wxTYPE_WINDOW;

    // X representation
    X = new wxWindow_Xintern;
    X->frame = X->handle = X->scroll = NULL;
    X->translations_eventmask = 0;
    X->last_clicktime = 0;
    X->last_clickbutton = 0;
    // device context
    dc = NULL;
    // child <-> parent relationships
    parent   = NULL;
    children = DEBUG_NEW wxChildList;
    // layout information
    constraints = DEBUG_NEW wxLayoutConstraints;
    wxLC_MEM(constraints->left, Absolute(0));
    wxLC_MEM(constraints->top, Absolute(0));
    wxLC_MEM(constraints->width, AsIs());
    wxLC_MEM(constraints->height, AsIs());
    xoff = yoff = 0;
    // GDI objects
    cmap   = wxAPP_COLOURMAP;
    cursor = NULL /* wxSTANDARD_CURSOR */;
    font   = wxSYSTEM_FONT;
    // misc info
    allow_dclicks    = FALSE;
    captured         = FALSE;
    drag_accept      = FALSE;
    painting_enabled = TRUE;
    style            = 0;
    user_edit_mode   = FALSE;

    {
      wxWindow **wa;
      wa = (wxWindow **)MALLOC_SAFEREF();
      saferef = wa;
    }
    SET_SAFEREF(saferef, this);
    misc_flags = 0;
    /* except for frames, windows start out shown: */
    if (!wxSubType(__type, wxTYPE_FRAME))
      misc_flags |= SHOWN_FLAG;
    internal_disabled = 0;

    WXGC_IGNORE(this, parent);
}

Here is the call graph for this function:

Definition at line 159 of file Window.cc.

{
#ifndef NO_XMB_LOOKUP_STRING
    if (X->ic) XDestroyIC(X->ic);
#endif

    // destroy children
    DestroyChildren(); DELETE_OBJ children; children = NULL;
    // destroy device context
    if (dc) DELETE_OBJ dc; dc = NULL;
    // remove from parents list
    if (parent)      parent->RemoveChild(this); parent = NULL;
    // destroy widgets
    wxSetSensitive(X->frame, TRUE);

    *saferef = NULL;

    dndTarget = NULL; /* just in case */

    if (X->frame) XtDestroyWidget(X->frame); X->frame = X->handle = X->scroll = NULL;
    DELETE_OBJ constraints; constraints = NULL;
    DELETE_OBJ X; X = NULL;
}

Here is the call graph for this function:


Member Function Documentation

Definition at line 192 of file Window.cc.

{
  /* Propagate busy cursor flag */
  child->user_edit_mode = user_edit_mode;

  children->Append(child);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1227 of file Window.cc.

{
  wxWindow * win;
  long mask, extra_mask;

  if (!X->frame || !X->handle) // forbid, if no widget associated
    return;

    // event handler for frame
    XtInsertEventHandler(X->frame,        // handle events for frame widget
                      StructureNotifyMask |      // for OnSize, OnEvent
                      SubstructureNotifyMask,// for adding of window-eventhandler
                      TRUE,               // for OnClose
                      (XtEventHandler)wxWindow::FrameEventHandler,
                      (XtPointer)saferef,
                      XtListHead);
    // handle expose events (works only for subclasses of xfwfCommonWidgetClass)
    if (XtIsSubclass(X->handle, xfwfCommonWidgetClass)) {
       XtAddCallback(X->handle, XtNexposeCallback,
                    (XtCallbackProc)wxWindow::ExposeEventHandler,
                    (XtPointer)saferef);
       XtVaSetValues(X->handle, XtNuseExposeCallback, TRUE, NULL);
      XtAddCallback(X->handle, XtNfocusHiliteChange,
                  (XtCallbackProc)FocusChangeCallback, 
                  (XtPointer)saferef);
    }
    // handle scroll events (works only for scrollable widgets)
    if (X->scroll) {
      XtAddCallback(X->scroll, XtNscrollCallback,
                  (XtCallbackProc)wxWindow::ScrollEventHandler,
                  (XtPointer)saferef);
      if (XtIsSubclass(X->scroll, xfwfCommonWidgetClass))
       XtAddCallback(X->scroll, XtNfocusHiliteChange,
                    (XtCallbackProc)FocusChangeCallback, 
                    (XtPointer)saferef);
    }

    if (XtIsSubclass(X->frame, xfwfCommonWidgetClass)) {
      XtAddCallback(X->frame, XtNonDestroy,
                  (XtCallbackProc)FreeSaferef,
                  (XtPointer)saferef);
      XtAddCallback(X->frame, XtNfocusHiliteChange,
                  (XtCallbackProc)FocusChangeCallback, 
                  (XtPointer)saferef);
    }

    win = this;

    // for OnPaint (non-xfwfCommonWidget-subclasses)
    extra_mask = (XtIsSubclass(win->X->handle, xfwfCommonWidgetClass)
                ? NoEventMask 
                : ExposureMask);

    mask = XtBuildEventMask(win->X->handle);
    win->X->translations_eventmask = mask;
    XtInsertEventHandler
      (win->X->handle,      // handle events for client area widget
       KeyPressMask |       // for OnChar
       KeyReleaseMask |
       ButtonPressMask |    // for OnEvent
       ButtonReleaseMask |
       ButtonMotionMask |
       PointerMotionMask | PointerMotionHintMask |
       EnterWindowMask |
       LeaveWindowMask |
       extra_mask,
       FALSE,
       (XtEventHandler)wxWindow::WindowEventHandler,
       (XtPointer)saferef,
       XtListHead);

    if (__type == wxTYPE_LIST_BOX) {
      /* Yuck. Get Mouse-moved events in total client area of listbox */
      XtInsertEventHandler
       (XtParent(win->X->handle),
        ButtonPressMask |   // for OnEvent
        ButtonReleaseMask |
        ButtonMotionMask |
        PointerMotionMask | PointerMotionHintMask,
        FALSE,
        (XtEventHandler)wxWindow::WindowEventHandler,
        (XtPointer)saferef,
        XtListHead);
    }

    if (win->X->scroll)
      RegisterAll(win->X->scroll);

    /* Yucky hack to make PreOnChar work for messages, sliders, and gauges: */
    extra_mask = ((wxSubType(win->__type, wxTYPE_MESSAGE) 
                 || wxSubType(win->__type, wxTYPE_SLIDER) 
                 || wxSubType(win->__type, wxTYPE_GAUGE))
                ? (KeyPressMask | KeyReleaseMask) : NoEventMask);

    XtInsertEventHandler
      (win->X->frame,       // handle events for frame widget
       EnterWindowMask |
       LeaveWindowMask |
       FocusChangeMask | // for OnKillFocus, OnSetFocus
       extra_mask,
       FALSE,
       (XtEventHandler)wxWindow::WindowEventHandler,
       (XtPointer)saferef,
       XtListHead);
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxWindow::AllowDoubleClick ( Bool  allow) [inline, virtual]

Definition at line 135 of file Window.h.

{ allow_dclicks = allow; }

Here is the caller graph for this function:

Bool wxWindow::CallPreOnChar ( wxWindow win,
wxKeyEvent event 
) [protected]

Definition at line 1108 of file Window.cc.

{
  wxWindow *p;

  p = win->GetParent();

  if (wxSubType(win->__type, wxTYPE_MENU_BAR)
      || wxSubType(win->__type, wxTYPE_MENU))
    return FALSE;

  if (wxSubType(win->__type, wxTYPE_FRAME)
      || wxSubType(win->__type, wxTYPE_DIALOG_BOX))
    p = NULL;

  return ((p && CallPreOnChar(p, event))
         || win->IsGray()
         || win->PreOnChar(this, event));
}

Here is the call graph for this function:

Bool wxWindow::CallPreOnEvent ( wxWindow win,
wxMouseEvent event 
) [protected]

Definition at line 1127 of file Window.cc.

{
  wxWindow *p;

  p = win->GetParent();

  if (wxSubType(win->__type, wxTYPE_MENU_BAR)
      || wxSubType(win->__type, wxTYPE_MENU))
    return FALSE;

  if (wxSubType(win->__type, wxTYPE_FRAME)
      || wxSubType(win->__type, wxTYPE_DIALOG_BOX))
    p = NULL;

  return ((p && CallPreOnEvent(p, event)) 
         || win->IsGray()
         || win->PreOnEvent(this, event));
}

Here is the call graph for this function:

void wxWindow::CaptureMouse ( void  ) [virtual]

Definition at line 780 of file Window.cc.

{
    if (!X->frame) // forbid, if no widget associated
       return;

    if (!captured) {
       XtAddGrab(X->frame, TRUE, FALSE);
       captured = TRUE;
    }
};
void wxWindow::Centre ( int  direction = wxBOTH) [virtual]

Definition at line 312 of file Window.cc.

{
    int x=-1,       y=-1,       width=0,      height=0,
       parent_x=0, parent_y=0, parent_width, parent_height;

    // get position and width of parent
    if (parent) {
       if ( wxSubType(__type, wxTYPE_FRAME) )
           parent->GetPosition(&parent_x, &parent_y);
       parent->GetClientSize(&parent_width, &parent_height);
    } else {
       wxDisplaySize(&parent_width, &parent_height);
    }
    // get position and size of THIS window
    GetPosition(&x, &y); GetSize(&width, &height);

    if (direction & wxCENTRE_TOPLEFT) {
       x = parent_x + parent_width / 2;
       y = parent_y + parent_height / 2;
    } else {
       // compute centered position
       if (direction & wxHORIZONTAL) {
           x = parent_x + (parent_width - width) / 2;
           if (x < 0)
             x = 0;
       }
       if (direction & wxVERTICAL) {
           y = parent_y + (parent_height - height) / 2;
           if (y < 0)
             y = 0;
       }
    }
    // move window
    Move(x, y);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::ChangeToGray ( Bool  gray) [virtual]

Reimplemented in wxCanvas, wxChoice, wxPanel, wxButton, and wxRadioBox.

Definition at line 791 of file Window.cc.

{
  if (XtIsSubclass(X->handle, xfwfLabelWidgetClass)
      || XtIsSubclass(X->handle, xfwfMultiListWidgetClass))
    XtVaSetValues(X->handle, XtNdrawgray, (Boolean)gray, NULL);

  if (X->scroll)
    XtVaSetValues(X->scroll, XtNdrawgrayScrollWin, (Boolean)gray, NULL);

  if (XtIsSubclass(X->frame, xfwfEnforcerWidgetClass))
    XtVaSetValues(X->frame, XtNdrawgray, (Boolean)gray, NULL);

  if (gray)
    ReleaseFocus();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::ClientToScreen ( int x,
int y 
) [virtual]

Definition at line 348 of file Window.cc.

{
  if (!X->handle) // forbid, if no widget associated
    return;

  {
    Display *dpy  = XtDisplay(X->handle);
    Screen  *scn  = XtScreen(X->handle);
    Window  root  = RootWindowOfScreen(scn);
    Window  win   = XtWindow(X->handle);
    Window  child;
    int xx = *x;
    int yy = *y;
    XTranslateCoordinates(dpy, win, root, xx, yy, x, y, &child);
  }
}

Here is the caller graph for this function:

void wxWindow::Configure ( int  x,
int  y,
int  width,
int  height,
int  flags 
) [virtual]

Definition at line 365 of file Window.cc.

{
    Arg    args[4];
    int    i = 0;
    int _xoff = 0, _yoff = 0;
    Position cx, cy;
    Dimension cw, ch;

    if (!X->frame) // forbid, if no widget associated
       return;

    if (!wxSubType(__type, wxTYPE_FRAME) && parent) {
       _xoff = parent->xoff;
       _yoff = parent->yoff;
    }

    /* Make sure width, height != 0 */
    if (!width) {
      width = 1;
      misc_flags |= REPORT_ZERO_WIDTH_FLAG;
    } else
      misc_flags -= (misc_flags & REPORT_ZERO_WIDTH_FLAG);

    if (!height) {
      height = 1;
      misc_flags |= REPORT_ZERO_HEIGHT_FLAG;
    } else
      misc_flags -= (misc_flags & REPORT_ZERO_HEIGHT_FLAG);

    XtSetArg(args[0], XtNx, &cx);
    XtSetArg(args[1], XtNy, &cy);
    XtSetArg(args[2], XtNwidth, &cw);
    XtSetArg(args[3], XtNheight, &ch);
    
    XtGetValues(X->frame, args, 4);

    if (((x > -1) || ((flags & wxPOS_USE_MINUS_ONE) && (x > wxDEFAULT_POSITION)))
       && ((Position)(x + _xoff) != cx))
      { args[i].name = XtNx; args[i].value = (Position)(x+_xoff); ++i; }
    if (((y > -1) || ((flags & wxPOS_USE_MINUS_ONE) && (y > wxDEFAULT_POSITION)))
       && ((Position)(y + _yoff) != cy))
      { args[i].name = XtNy; args[i].value = (Position)(y+_yoff); ++i; }
    if ((width > -1) && ((Dimension)width != cw))
      { args[i].name = XtNwidth; args[i].value = (Dimension)width; ++i; }
    if ((height > -1) && ((Dimension)height != ch))
      { args[i].name = XtNheight; args[i].value = (Dimension)height; ++i; }

    if (i) {
      XtSetValues(X->frame, args, i);
      OnSize(width, height);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxWindow::CreateCaret ( int   WXUNUSEDw,
int   WXUNUSED
) [inline, virtual]

Definition at line 113 of file Window.h.

{};
virtual void wxWindow::CreateCaret ( wxBitmap WXUNUSEDbitmap) [inline, virtual]

Definition at line 114 of file Window.h.

{};
void wxWindow::CreateDC ( void  ) [protected]

Definition at line 2393 of file Window.cc.

{
    wxWindowDC_Xinit *init;

    if (dc) return; // only create once!

    dc = DEBUG_NEW wxWindowDC;
    // Initialize wxWindowDC
    init = new wxWindowDC_Xinit;
    init->dpy      = wxAPP_DISPLAY; // display is global to application
    init->scn      = wxAPP_SCREEN;  //  screen is global to application
    init->owner    = this;
    init->drawable = XtWindow(X->handle);
    dc->ok = TRUE;
    
    dc->Initialize(init);

    dc->X->is_window = TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxWindow::DestroyCaret ( void  ) [inline, virtual]

Definition at line 115 of file Window.h.

{};

Definition at line 200 of file Window.cc.

{
  wxChildNode *node;
  while ( (node=children->First()) != NULL ) {
    wxWindow *child;
    child = (wxWindow*)(node->Data());
    if (child) {
      DELETE_OBJ child;
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::DestroyDC ( void  ) [protected]

Definition at line 2413 of file Window.cc.

{
    if (!dc) return; // no DC to destroy
    // destroy device context
    DELETE_OBJ dc;
    dc = NULL;
}
void wxWindow::DragAcceptFiles ( Bool  accept) [virtual]

Definition at line 2478 of file Window.cc.

{
  wxWindow *p;

  if (!drag_accept == !accept)
    return;

  drag_accept = accept;
  
  if (!dnd_inited) {
    xdnd_init(&dnd, wxAPP_DISPLAY);
    dnd_inited = 1;
  }

  /* Declare drag-and-drop possible at this
     window's top-level frame: */

  p = this;
  while (p) {
    if (wxSubType(p->__type, wxTYPE_FRAME)
       || wxSubType(p->__type, wxTYPE_DIALOG_BOX))
      break;
    p = p->GetParent();
  }
  
  {
    Atom l[2];
    l[0] = dnd.text_uri_list;
    l[1] = 0;
    xdnd_set_dnd_aware(&dnd, XtWindow(p->X->frame), l);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::Enable ( Bool  enable) [virtual]

Reimplemented in wxRadioBox.

Definition at line 860 of file Window.cc.

{
  Bool orig_enabled = !(misc_flags & DISABLED_FLAG);

  if (!X->frame || !X->handle) // forbid, if no widget associated
    return;
  
  if (orig_enabled == !!enable)
    return;

  if (!enable)
    misc_flags |= DISABLED_FLAG;
  else
    misc_flags -= DISABLED_FLAG;

  if (!internal_disabled)
    wxSetSensitive(X->frame, enable);

  /* Doing handle sensitive makes it gray: */
  if (!internal_gray_disabled)
    ChangeToGray(!enable);
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxWindow::EnablePainting ( Bool  enable) [inline, virtual]

Definition at line 139 of file Window.h.

{ painting_enabled = enable; }
void wxWindow::EnableScrolling ( Bool  x,
Bool  y 
) [virtual]

Definition at line 613 of file Window.cc.

{
  if (X->scroll) {
    XtVaSetValues(X->scroll, XtNhideHScrollbar, !x, XtNhideVScrollbar, !y, NULL);
  }
}

Here is the caller graph for this function:

virtual void wxWindow::Fit ( void  ) [inline, virtual]

Reimplemented in wxFrame, and wxPanel.

Definition at line 140 of file Window.h.

{}

Here is the caller graph for this function:

void wxWindow::FocusChangeCallback ( void ,
wxWindow **  winp,
void on 
) [static, protected]

Definition at line 1177 of file Window.cc.

{
  wxWindow *win = (wxWindow *)GET_SAFEREF(winp);

  if (!win) {
#ifdef MZ_PRECISE_GC
    XFORM_RESET_VAR_STACK;
#endif
    return;
  }

  if (on) {
    win->misc_flags |= FOCUS_FLAG;
    win->OnSetFocus();
  } else { 
    win->misc_flags -= (win->misc_flags & FOCUS_FLAG);
    win->OnKillFocus();
  }

#ifdef MZ_PRECISE_GC
  XFORM_RESET_VAR_STACK;
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::ForEach ( void(*)(wxWindow *w, void *data foreach,
void data 
)

Definition at line 2448 of file Window.cc.

{
  wxChildNode *node, *next;

#ifdef MZ_PRECISE_GC
  if (__type == wxTYPE_MENU_BAR)
    return;
#endif

  for (node = children->First(); node; node = next) {
    wxWindow *child;
    next = node->Next();
    child = (wxWindow*)(node->Data());
    if (child) {
      child->ForEach(foreach, data);
    }
  }

  foreach(this, data);
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxWindow::GetCaretPos ( int WXUNUSEDx,
int WXUNUSED
) [inline, virtual]

Definition at line 118 of file Window.h.

{};

Definition at line 77 of file Window.h.

{ return children; }

Here is the caller graph for this function:

void wxWindow::GetClientSize ( int width,
int height 
) [virtual]

Reimplemented in wxFrame, and wxPanel.

Definition at line 452 of file Window.cc.

{
    Dimension dww, dhh, fw, fh;
    int ww, hh;

    if (!X->handle) // forbid, if no widget associated
       return;

    XtVaGetValues(X->handle, XtNwidth, &dww, XtNheight, &dhh, NULL);
    if (X->scroll && !(misc_flags & NO_AUTO_SCROLL_FLAG)) {
      /* Handle window is possibly bigger than actual visible area */
      Dimension xs, ys;
      xws_get_scroll_area(X->scroll, &xs, &ys);
      if (wxSubType(__type, wxTYPE_LIST_BOX)) {
       dww = xs;
       dhh = ys;
      } else {
       if (xs < dww)
         dww = xs;
       if (ys < dhh)
         dhh = ys;
      }
    }

    XtVaGetValues(X->frame, XtNwidth, &fw, XtNheight, &fh, NULL);

    /* If frame < contained, don't believe the number! */
    if (fw < dww)
      dww = 0;
    if (fh < dhh)
      dhh = 0;

    ww = (int)dww;
    hh = (int)dhh;

    if (XtIsSubclass(X->handle, xfwfFrameWidgetClass)) {
      Dimension fw, oo, io;

      XtVaGetValues(X->handle, 
                  XtNframeWidth, &fw, 
                  XtNouterOffset, &oo, 
                  XtNinnerOffset, &io, 
                  NULL);

      ww = ww - fw - oo - io;
      hh = hh - fw - oo - io;
    }

    *width = ww; *height = hh;
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual wxLayoutConstraints* wxWindow::GetConstraints ( void  ) [inline, virtual]

Definition at line 130 of file Window.h.

        { return constraints; }

Here is the caller graph for this function:

Definition at line 2421 of file Window.cc.

{ 
  if (!dc) {
    if (!(style & wxNO_DC))
      CreateDC();
  }
  
  return dc; 
}

Here is the call graph for this function:

Here is the caller graph for this function:

wxFont* wxWindow::GetFont ( void  ) [inline]

Definition at line 178 of file Window.h.

{ return font; }

Definition at line 187 of file Window.cc.

{
    return (parent ? parent->parent : (wxWindow*)NULL);
}
wxWindow_Xintern* wxWindow::GetHandle ( void  ) [inline]

Definition at line 75 of file Window.h.

{ return X; }

Here is the caller graph for this function:

char * wxWindow::GetLabel ( void  ) [virtual]

Reimplemented in wxRadioBox, wxButton, wxMessage, and wxCheckBox.

Definition at line 221 of file Window.cc.

{
  char *label = NULL;

  if (!X->frame) // forbid, if no widget associated
    return NULL;
  
  XtVaGetValues(X->frame, XtNlabel, &label, NULL);
  return label;
}
char * wxWindow::GetName ( void  ) [virtual]

Definition at line 232 of file Window.cc.

{
    if (!X->handle) // forbid, if no widget associated
       return NULL;

    return XtName(X->handle);
}

Definition at line 79 of file Window.h.

{ return parent; }

Here is the caller graph for this function:

void wxWindow::GetPosition ( int x,
int y 
) [virtual]

Reimplemented in wxFrame.

Definition at line 418 of file Window.cc.

{
    int _xoff = 0, _yoff = 0;
    Position xx, yy;

    if (!X->frame) // forbid, if no widget associated
       return;

    if (!wxSubType(__type, wxTYPE_FRAME) && parent) {
       _xoff = parent->xoff;
       _yoff = parent->yoff;
    }

    XtVaGetValues(X->frame, XtNx, &xx, XtNy, &yy, NULL);
    *x = (int)xx - _xoff; *y = (int)yy - _yoff;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::GetRefreshSize ( int w,
int h 
) [virtual]

Reimplemented in wxCanvas.

Definition at line 896 of file Window.cc.

{
  GetSize(w, h);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int wxWindow::GetScrollPage ( int  orient) [virtual]

Definition at line 646 of file Window.cc.

{
  if (!X->scroll) return 0; // window is not scrollable
  
    if (!(misc_flags & NO_AUTO_SCROLL_FLAG))
      return 0;
 
  if (orient == wxHORIZONTAL) {
    if (!hs_width)
      return 0;
    return hs_page;
  } else {
    if (!vs_width)
      return 0;
    return vs_page;
  }
}
int wxWindow::GetScrollPos ( int  orient) [virtual]

Definition at line 620 of file Window.cc.

{
    if (!X->scroll) return 0; // window is not scrollable

    if (!(misc_flags & NO_AUTO_SCROLL_FLAG))
      return 0;
 
    if (misc_flags & NO_AUTO_SCROLL_FLAG) {
      return orient == wxHORIZONTAL ? hs_pos : vs_pos;
    } else {
      Position pos;
      XtVaGetValues(X->handle, orient == wxHORIZONTAL ? XtNx : XtNy, &pos, NULL);
      return -pos;
    }
}

Here is the caller graph for this function:

int wxWindow::GetScrollRange ( int  orient) [virtual]

Definition at line 636 of file Window.cc.

{
    if (!X->scroll) return 0; // window is not scrollable

    if (!(misc_flags & NO_AUTO_SCROLL_FLAG))
      return 0;
 
    return orient == wxHORIZONTAL ? hs_width : vs_width;
}
Bool wxWindow::GetsFocus ( void  ) [inline]

Definition at line 174 of file Window.h.

{ return TRUE; }
void wxWindow::GetSize ( int width,
int height 
) [virtual]

Reimplemented in wxFrame, and wxChoice.

Definition at line 435 of file Window.cc.

{
    Dimension ww, hh;

    if (!X->frame) // forbid, if no widget associated
       return;

    XtVaGetValues(X->frame, XtNwidth, &ww, XtNheight, &hh, NULL);
    *width = ww; *height = hh;
    
    if (misc_flags & REPORT_ZERO_WIDTH_FLAG)
      *width = 0;
    if (misc_flags & REPORT_ZERO_HEIGHT_FLAG)
      *height = 0;
}

Here is the caller graph for this function:

void wxWindow::GetTextExtent ( const char *  string,
double *  x,
double *  y,
double *  descent = NULL,
double *  externalLeading = NULL,
wxFont theFont = NULL,
Bool  use16bit = FALSE 
) [virtual]

Definition at line 2431 of file Window.cc.

{
  if (dc) {
    dc->GetTextExtent(s, w, h, descent, ext_leading, theFont, use16bit);
    return;
  }
  
  if (!theFont) theFont = font;
  
  wxGetTextExtent(wxAPP_DISPLAY, 1.0, 1.0,
                s, w, h, descent, ext_leading, theFont,
                1, use16bit, 0, -1);
}

Here is the call graph for this function:

Here is the caller graph for this function:

char * wxWindow::GetTitle ( void  ) [virtual]

Reimplemented in wxFrame.

Definition at line 240 of file Window.cc.

{
  char *title = NULL;
  
  if (!X->frame) // forbid, if no widget associated
    return NULL;
  
  XtVaGetValues(X->frame, XtNtitle, &title, NULL);
  return title;
}
virtual Bool wxWindow::GetUserEditMode ( void  ) [inline, virtual]

Definition at line 141 of file Window.h.

{ return user_edit_mode; }

Definition at line 2469 of file Window.cc.

{
  return (long)X->handle;
}

Here is the caller graph for this function:

virtual long wxWindow::GetWindowStyleFlag ( void  ) [inline, virtual]

Definition at line 142 of file Window.h.

{ return style; }

Here is the caller graph for this function:

Definition at line 176 of file Window.h.

{ return saferef; }

Here is the caller graph for this function:

Definition at line 99 of file wxGC.cxx.

{
  GC_finalization_proc old_fn;
  void *old_data;

# ifdef MZ_PRECISE_GC
#  define ALLOW_NON_BASE 0
#  define CHECK_BASE 0
# else
#  ifdef wx_xt
#   define ALLOW_NON_BASE 0
#   define CHECK_BASE 0
#  else
#   ifdef WIN32
#    define ALLOW_NON_BASE 0
#    define CHECK_BASE 1
#    define CRASH_ON_NONBASE 1
#   else
#    define ALLOW_NON_BASE 1
#    define CHECK_BASE 0
#   endif
#  endif
# endif

# if CHECK_BASE || ALLOW_NON_BASE
  if (GC_base(this) != (void *)this) {
#  if ALLOW_NON_BASE
    return;
#  else
#   ifdef CRASH_ON_NONBASE
    *(long *)0x0 = 1;
#   else
    printf("Clean-up object is not the base object\n");
    abort();
#   endif
#  endif
  }
# endif

  GC_register_finalizer_ignore_self(gcOBJ_TO_PTR(this), 
                                CAST_GCP GC_cleanup, NULL, 
                                CAST_GCPP &old_fn, &old_data);

# if CHECK_BASE
  if (old_fn) {
#  ifdef CRASH_ON_NONBASE
       *(long *)0x0 = 1;
#  else
    printf("Object already has a clean-up\n");
    abort();
#  endif
  }
# endif
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::InternalEnable ( Bool  enable,
Bool  gray = FALSE 
)

Definition at line 833 of file Window.cc.

{
  Bool do_something;
  short start_igd = internal_gray_disabled;
  
  if (!X->frame || !X->handle) // forbid, if no widget associated
    return;
  
  if (!enable) {
    do_something = !internal_disabled;
    internal_disabled++;
    if (gray)
      internal_gray_disabled++;
  } else { 
    --internal_disabled;
    do_something = !internal_disabled;
    if (gray)
      --internal_gray_disabled;
  }

  if (do_something && !(misc_flags & DISABLED_FLAG))
    wxSetSensitive(X->frame, enable);

  if ((!!internal_gray_disabled != !!start_igd) && !(misc_flags & DISABLED_FLAG))
    ChangeToGray(!!internal_gray_disabled);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 828 of file Window.cc.

Here is the caller graph for this function:

Definition at line 994 of file Window.cc.

{
  return !!(misc_flags & SHOWN_FLAG);
}

Here is the caller graph for this function:

void wxWindow::Layout ( void  ) [virtual]

Reimplemented in wxCanvas, wxFrame, and wxPanel.

Definition at line 499 of file Layout.cc.

{
    /*
     * Main constrained layout algorithm. Look at all the child
     * windows, and their constraints (if any).
     * The idea is to keep iterating through the constraints
     * until all left, right, bottom and top edges, and widths and heights,
     * are known (or no change occurs and we've failed to resolve all
     * constraints).
     *
     * If the user has not specified a dimension or edge, it will be
     * be calculated from the other known values. E.g. If we know
     * the right hand edge and the left hand edge, we now know the width.
     * The snag here is that this means we must specify absolute dimensions
     * twice (in constructor and in constraint), if we wish to use the
     * constraint notation to just set the position, for example.
     * Otherwise, if we only set ONE edge and no dimension, it would never
     * find the other edge.
     *
     * Algorithm:
     *
     *    Mark all constraints as not done.
     *
     *    iterations = 0;
     *    until (no change) or (iterations >= max iterations)
     *    {
     *        For each child:
     *        {
     *            Calculate all constraints
     *        }
     *        ++iterations;
     *    }
     *
     *    For each child:
     *        Set each calculated position and size
     *
     */

    wxChildNode *node;
    wxWindow *child;
    wxLayoutConstraints *constr;

    // Layout only if children
    if (children->Number() == 0)
       return;
#ifdef MZ_PRECISE_GC
    if (__type == wxTYPE_MENU_BAR)
      return;
#endif

    // reset all constraints to NOT done
    for (node = children->First(); node; node = node->Next()) {
       child  = (wxWindow *)node->Data();
       if (wxSubType(child->__type, wxTYPE_FRAME))
           continue;
       constr = child->GetConstraints();
       constr->UnDone();
    }
    // iterate through child until (no changes) || (no left iterations)
    {
      int  left_iterations = wxLAYOUT_MAX_ITERATIONS;
      Bool changes;
      do {
       changes = FALSE;
       for (node = children->First(); node; node = node->Next()) {
         child  = (wxWindow *)node->Data();
         if (wxSubType(child->__type, wxTYPE_FRAME))
           continue;
         constr = child->GetConstraints();
         changes |= constr->SatisfyConstraints(child);
       }
      } while (changes && --left_iterations);
    }
    // set sizes and positions as computed above
    for (node = children->First(); node; node = node->Next()) {
       child  = (wxWindow *)node->Data();
       if (wxSubType(child->__type, wxTYPE_FRAME))
           continue;
       constr = child->GetConstraints();
       if (wxLC_MEM(constr->left, done) && wxLC_MEM(constr->right, done)
           && wxLC_MEM(constr->width, done) && wxLC_MEM(constr->height, done)) {
           // Configure calls OnSize()
           child->Configure(wxLC_MEM(constr->left, value),  wxLC_MEM(constr->top, value),
                          wxLC_MEM(constr->width, value), wxLC_MEM(constr->height, value),
                          wxPOS_USE_MINUS_ONE);
           // layout child
           child->Layout();
       }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxWindow::Move ( int  x,
int  y 
) [inline, virtual]

Definition at line 98 of file Window.h.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxEvtHandler::OnActivate ( Bool   WXUNUSEDactive) [inline, virtual, inherited]

Definition at line 47 of file EvtHandler.h.

{};

Here is the caller graph for this function:

virtual void wxEvtHandler::OnChangeFocus ( wxItem WXUNUSEDfrom,
wxItem WXUNUSEDto 
) [inline, virtual, inherited]

Definition at line 48 of file EvtHandler.h.

                                                        {};
virtual void wxEvtHandler::OnChar ( wxKeyEvent WXUNUSEDevent) [inline, virtual, inherited]

Definition at line 50 of file EvtHandler.h.

{};
_XFUNCPROTOEND void wxWindow::OnChar ( wxKeyEvent event) [virtual]

Reimplemented in os_wxCanvas, wxListBox, wxChoice, and wxCanvas.

Definition at line 1028 of file Window.cc.

{
    GC_CAN_IGNORE XEvent onstack;
    XEvent *xev = (XEvent*)wxevent->eventHandle; // X event
    if (!xev) {
     xev = &onstack;
     xev->xkey.type = KeyPress;
     xev->xkey.display = wxAPP_DISPLAY;
     xev->xkey.window = XtWindow(X->handle);
     xev->xkey.root = RootWindowOfScreen(wxAPP_SCREEN);
     xev->xkey.subwindow = XtWindow(X->handle);
     xev->xkey.time = 0L;
     xev->xkey.send_event = 0;
     xev->xkey.same_screen = 0;
     xev->xkey.serial = 0;
    }

    // check if widget has translations and if this event is selected by the widget
    if (X->handle->core.tm.translations
       && (X->translations_eventmask & _XtConvertTypeToMask(xev->type))) {
      // translate wxKeyEvent to XEvent
      KeySym keysym;
      keysym = CharCodeWXToX(wxevent->keyCode);
      if (keysym != 0) {
       long kc;
       kc = XKeysymToKeycode(xev->xkey.display, keysym);
       xev->xkey.keycode = kc;
       xev->xkey.x    = (int)wxevent->x;
       xev->xkey.y    = (int)wxevent->y;
       xev->xkey.state &= ~(ShiftMask | ControlMask | Mod1Mask | Mod3Mask | LockMask);
       xev->xkey.state |= (wxevent->altDown     ? Mod3Mask    : 0) |
                        (wxevent->controlDown ? ControlMask : 0) |
                        (wxevent->metaDown    ? Mod1Mask    : 0) |
                        (wxevent->shiftDown   ? ShiftMask   : 0) |
                        (wxevent->capsDown    ? LockMask    : 0);
       // call Widget methods to handle this event
       _XtTranslateEvent(X->handle, xev);
      }
    }
}

Here is the call graph for this function:

virtual Bool wxEvtHandler::OnCharHook ( wxKeyEvent WXUNUSEDevent) [inline, virtual, inherited]

Definition at line 51 of file EvtHandler.h.

{ return FALSE; }
virtual Bool wxEvtHandler::OnClose ( void  ) [inline, virtual, inherited]

Reimplemented in os_wxDialogBox, and os_wxFrame.

Definition at line 52 of file EvtHandler.h.

{ return TRUE; };

Here is the caller graph for this function:

virtual void wxEvtHandler::OnCommand ( wxWindow WXUNUSEDwin,
wxCommandEvent WXUNUSEDevent 
) [inline, virtual, inherited]

Definition at line 53 of file EvtHandler.h.

                                                               {};
void wxWindow::OnCommand ( wxWindow win,
wxCommandEvent event 
) [virtual]

Definition at line 1069 of file Window.cc.

{
    // OnCommand events are routed to the parent by default
    if (parent)
      parent->OnCommand(win, event);
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxEvtHandler::OnDefaultAction ( wxItem WXUNUSEDinitiatingItem) [inline, virtual, inherited]

Definition at line 55 of file EvtHandler.h.

{};
virtual void wxEvtHandler::OnDropFile ( char *  WXUNUSEDfile) [inline, virtual, inherited]

Definition at line 56 of file EvtHandler.h.

{};
virtual void wxEvtHandler::OnEvent ( wxMouseEvent WXUNUSEDevent) [inline, virtual, inherited]

Definition at line 57 of file EvtHandler.h.

{};
void wxWindow::OnEvent ( wxMouseEvent event) [virtual]

Reimplemented in os_wxCanvas, and wxChoice.

Definition at line 1076 of file Window.cc.

{
  EventMask  mask;
  XEvent    *xev = (XEvent*)wxevent->eventHandle; // X event

  if (!xev) return;

  mask = _XtConvertTypeToMask(xev->xany.type); // eventmask of event

  // adapt converted mask (Xt error????)
  if (mask & ButtonMotionMask)
    mask |= Button1MotionMask | Button2MotionMask | Button3MotionMask |
      Button4MotionMask | Button5MotionMask;
  // check if widget has translations and if this event is selected by the widget
  if (X->handle->core.tm.translations && (X->translations_eventmask & mask)) {
    // no translation of wxMouseEvents to XEvents as for OnChar
    // --- may be added on request ---
    // call Widget methods to handle this event
    _XtTranslateEvent(X->handle, xev);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Bool wxEvtHandler::OnFunctionKey ( wxKeyEvent WXUNUSEDevent) [inline, virtual, inherited]

Definition at line 58 of file EvtHandler.h.

{ return FALSE; };
virtual void wxEvtHandler::OnKillFocus ( void  ) [inline, virtual, inherited]

Reimplemented in os_wxDialogBox, os_wxRadioBox, os_wxMessage, os_wxListBox, os_wxChoice, os_wxCanvas, os_wxWindow, os_wxFrame, os_wxPanel, os_wxsGauge, os_wxSlider, os_wxCheckBox, and os_wxButton.

Definition at line 59 of file EvtHandler.h.

{};

Here is the caller graph for this function:

virtual void wxEvtHandler::OnLeftClick ( int   WXUNUSEDx,
int   WXUNUSEDy,
int   WXUNUSEDkeys 
) [inline, virtual, inherited]

Definition at line 60 of file EvtHandler.h.

                                                    {};
virtual void wxEvtHandler::OnMenuCommand ( long   WXUNUSEDcmd) [inline, virtual, inherited]

Definition at line 62 of file EvtHandler.h.

{};

Here is the caller graph for this function:

virtual void wxEvtHandler::OnMenuSelect ( long   WXUNUSEDcmd) [inline, virtual, inherited]

Definition at line 63 of file EvtHandler.h.

{};
virtual void wxEvtHandler::OnMove ( int   WXUNUSEDx,
int   WXUNUSED
) [inline, virtual, inherited]

Definition at line 64 of file EvtHandler.h.

{};
void wxWindow::OnPaint ( void  ) [virtual]

Reimplemented from wxEvtHandler.

Reimplemented in os_wxCanvas.

Definition at line 1146 of file Window.cc.

{
    // This works only for subclasses of the xfwfCommonWidgetClass
    XfwfCallExpose(X->handle, X->expose_event, X->expose_region);
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxEvtHandler::OnRightClick ( int   WXUNUSEDx,
int   WXUNUSEDy,
int   WXUNUSEDkeys 
) [inline, virtual, inherited]

Definition at line 66 of file EvtHandler.h.

                                                     {};
virtual void wxEvtHandler::OnScroll ( wxScrollEvent WXUNUSEDevent) [inline, virtual, inherited]

Definition at line 68 of file EvtHandler.h.

{};
void wxWindow::OnScroll ( wxScrollEvent event) [virtual]

Reimplemented in os_wxCanvas, and wxListBox.

Definition at line 1152 of file Window.cc.

{
}

Here is the caller graph for this function:

virtual void wxEvtHandler::OnSelect ( Bool   WXUNUSEDselect) [inline, virtual, inherited]

Definition at line 69 of file EvtHandler.h.

{};
virtual void wxEvtHandler::OnSetFocus ( void  ) [inline, virtual, inherited]

Reimplemented in os_wxDialogBox, os_wxRadioBox, os_wxMessage, os_wxListBox, os_wxChoice, os_wxCanvas, os_wxWindow, os_wxFrame, os_wxPanel, os_wxsGauge, os_wxSlider, os_wxCheckBox, and os_wxButton.

Definition at line 70 of file EvtHandler.h.

{};

Here is the caller graph for this function:

virtual void wxEvtHandler::OnSize ( int   WXUNUSEDwidth,
int   WXUNUSEDheight 
) [inline, virtual, inherited]

Definition at line 71 of file EvtHandler.h.

{};

Here is the caller graph for this function:

void gc::operator delete ( void obj) [inline, inherited]
void gc::operator delete ( void obj) [inline, inherited]

Definition at line 287 of file gc_cpp.h.

                                           {
    GC_FREE( obj );}

Here is the caller graph for this function:

void gc::operator delete ( void ,
void  
) [inline, inherited]

Definition at line 291 of file gc_cpp.h.

{}
void gc::operator delete[] ( void obj) [inline, inherited]

Definition at line 305 of file gc_cpp.h.

                                             {
    gc::operator delete( obj );}

Here is the call graph for this function:

void gc::operator delete[] ( void ,
void  
) [inline, inherited]

Definition at line 309 of file gc_cpp.h.

{}
void* gc::operator new ( size_t  size) [inline, inherited]
void* gc::operator new ( size_t  size,
GCPlacement  gcp 
) [inline, inherited]
void * gc::operator new ( size_t  size) [inline, inherited]

Definition at line 273 of file gc_cpp.h.

                                           {
    return GC_MALLOC( size );}

Here is the caller graph for this function:

void * gc::operator new ( size_t  size,
GCPlacement  gcp 
) [inline, inherited]

Definition at line 276 of file gc_cpp.h.

                                                            {
    if (gcp == UseGC) 
        return GC_MALLOC( size );
    else if (gcp == PointerFreeGC)
       return GC_MALLOC_ATOMIC( size );
    else
        return GC_MALLOC_UNCOLLECTABLE( size );}
void * gc::operator new ( size_t  size,
void p 
) [inline, inherited]

Definition at line 284 of file gc_cpp.h.

                                                    {
    return p;}
void * gc::operator new[] ( size_t  size) [inline, inherited]

Definition at line 296 of file gc_cpp.h.

                                             {
    return gc::operator new( size );}

Here is the call graph for this function:

void * gc::operator new[] ( size_t  size,
GCPlacement  gcp 
) [inline, inherited]

Definition at line 299 of file gc_cpp.h.

                                                              {
    return gc::operator new( size, gcp );}

Here is the call graph for this function:

void * gc::operator new[] ( size_t  size,
void p 
) [inline, inherited]

Definition at line 302 of file gc_cpp.h.

                                                      {
    return p;}
virtual void wxWindow::Paint ( void  ) [inline, virtual]

Reimplemented in wxCanvas.

Definition at line 143 of file Window.h.

{ OnPaint(); }

Here is the call graph for this function:

Bool wxWindow::PopupMenu ( wxMenu menu,
double  x,
double  y,
Bool  for_choice = 0,
int  top_extra = 0 
) [virtual]

Definition at line 883 of file Window.cc.

{
  int dev_x = (int)x;
  int dev_y = (int)y;
  
  if (!X->frame || !X->handle) // forbid, if no widget associated
    return FALSE;

  ClientToScreen(&dev_x, &dev_y);
  menu->PopupMenu(X->frame, dev_x, dev_y, for_choice, top_extra);
  return TRUE;
}

Here is the call graph for this function:

Bool wxWindow::PreOnChar ( wxWindow ,
wxKeyEvent  
) [virtual]

Reimplemented in os_wxDialogBox, os_wxRadioBox, os_wxMessage, os_wxListBox, os_wxChoice, os_wxCanvas, os_wxWindow, os_wxFrame, os_wxPanel, os_wxsGauge, os_wxSlider, os_wxCheckBox, and os_wxButton.

Definition at line 1098 of file Window.cc.

{
  return FALSE;
}

Here is the caller graph for this function:

Bool wxWindow::PreOnEvent ( wxWindow ,
wxMouseEvent  
) [virtual]

Reimplemented in os_wxDialogBox, os_wxRadioBox, os_wxMessage, os_wxListBox, os_wxChoice, os_wxCanvas, os_wxWindow, os_wxFrame, os_wxPanel, os_wxsGauge, os_wxSlider, os_wxCheckBox, and os_wxButton.

Definition at line 1103 of file Window.cc.

{
  return FALSE;
}

Here is the caller graph for this function:

void wxWindow::Refresh ( void  ) [virtual]

Definition at line 901 of file Window.cc.

{
    XExposeEvent  dummyEvent;
    int           width, height;

    if (!X->handle) // forbid, if no widget associated
       return;

    GetRefreshSize(&width, &height);

    dummyEvent.type    = Expose;
    dummyEvent.display        = XtDisplay(X->handle);
    dummyEvent.send_event = True;
    dummyEvent.window         = XtWindow(X->handle);
    dummyEvent.x       = 0;
    dummyEvent.y       = 0;
    dummyEvent.width   = width;
    dummyEvent.height         = height;
    dummyEvent.count   = 0;

    XSendEvent(XtDisplay(X->handle), XtWindow(X->handle),
              False, ExposureMask, (XEvent*)&dummyEvent);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in wxPanel.

Definition at line 823 of file Window.cc.

{
  ReleaseFocus();
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 807 of file Window.cc.

{
  /* If disabling and this window has the focus, get rid of it: */
  if (misc_flags & FOCUS_FLAG) {
    wxWindow *p;
    p = GetParent();
    while (p) {
      if (wxSubType(p->__type, wxTYPE_FRAME)) {
       p->SetFocus();
       break;
      }
      p = p->GetParent();
    }
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::ReleaseMouse ( void  ) [virtual]

Definition at line 925 of file Window.cc.

{
    if (!X->frame) // forbid, if no widget associated
       return;

    if (captured) {
       XtRemoveGrab(X->frame);
       captured = FALSE;
    }
};

Definition at line 212 of file Window.cc.

{
    children->DeleteObject(child);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::ScreenToClient ( int x,
int y 
) [virtual]

Definition at line 503 of file Window.cc.

{
  if (!X->handle) // forbid, if no widget associated
    return;
    
  {
    Display *dpy  = XtDisplay(X->handle);
    Screen  *scn  = XtScreen(X->handle);
    Window  root  = RootWindowOfScreen(scn);
    Window  win   = XtWindow(X->handle);
    Window  child;
    int xx = *x;
    int yy = *y;
    XTranslateCoordinates(dpy, root, win, xx, yy, x, y, &child);
  }
}

Here is the caller graph for this function:

void wxWindow::Scroll ( int  x_pos,
int  y_pos 
) [virtual]

Reimplemented in wxCanvas.

Definition at line 664 of file Window.cc.

{
    if (!X->scroll)
       return; // don't want to scroll or window not scrollable

    if (misc_flags & NO_AUTO_SCROLL_FLAG) {
      if (x_pos >= 0) {
       hs_pos = x_pos;
       if (hs_pos > hs_width)
         hs_pos = hs_width;
      }
      if (y_pos >= 0) {
       vs_pos = y_pos;
       if (vs_pos > vs_width)
         vs_pos = vs_width;
      }

      xws_set_scroll_direct(X->scroll, hs_width, hs_page, hs_pos, vs_width, vs_page, vs_pos);
    } else {
      Position dummy; int wd, ht; Dimension gwd, ght;
      // size of view port
      XfwfCallComputeInside(X->scroll, &dummy, &dummy, &wd, &ht);
      // size of scrollable window
      XtVaGetValues(X->handle, XtNheight, &ght, XtNwidth, &gwd, NULL);
      // get missing position if any (x_pos <0 || y_pos < 0)
      if (x_pos < 0) { XtVaGetValues(X->handle, XtNx, &dummy, NULL); x_pos = -dummy; }
      if (y_pos < 0) { XtVaGetValues(X->handle, XtNy, &dummy, NULL); y_pos = -dummy; }
      // compute correct (x,y)-position - 0<=x<=gwd-wd, 0<=y<=ght-ht
      x_pos = min(x_pos, gwd-wd); x_pos = max(0, x_pos);
      y_pos = min(y_pos, ght-ht); y_pos = max(0, y_pos); 
      // set position
      XtVaSetValues(X->handle, XtNx, (Position)(-x_pos), XtNy, (Position)(-y_pos), NULL);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxWindow::SetCaretPos ( int   WXUNUSEDx,
int   WXUNUSED
) [inline, virtual]

Definition at line 117 of file Window.h.

{};
virtual void wxWindow::SetClientSize ( int  width,
int  height 
) [inline, virtual]

Reimplemented in wxFrame.

Definition at line 101 of file Window.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 600 of file Window.cc.

{
  if (constr)
    constraints = constr;
}

Here is the caller graph for this function:

wxCursor * wxWindow::SetCursor ( wxCursor cursor) [virtual]

Definition at line 543 of file Window.cc.

{
  wxCursor *previous;

  if (!X->handle) // forbid, if no widget associated
    return NULL;
  
  previous = cursor;
  
  if (!new_cursor || (new_cursor && new_cursor->Ok())) {
    cursor = new_cursor;
    if (!user_edit_mode) { /* really indicates busy_cursor */
      Cursor c;
      c = (new_cursor ? GETCURSOR(new_cursor) : None);
      XtVaSetValues(X->handle, XtNcursor, c, NULL);
      if (__type == wxTYPE_LIST_BOX) {
       /* Yuck. Set cursor for total client area of listbox */
       XtVaSetValues(XtParent(X->handle), XtNcursor, c, NULL);
      }
      if ((__type == wxTYPE_PANEL)
         || (__type == wxTYPE_FRAME)
         || (__type == wxTYPE_DIALOG_BOX)) {
       /* Yuck. If the child panel has grabbed the cursor, update
          it. */
       if (grabbing_panel) {
         wxWindow *p = grabbing_panel;
         while (p) {
           if (p->cursor)
             break;
           if (wxSubType(p->__type, wxTYPE_FRAME)
              || wxSubType(p->__type, wxTYPE_DIALOG_BOX))
             p = NULL;
           else
             p = p->GetParent();
         }
       
         if (p == this) {
           /* Grabbing panel uses this cursor */
           XChangeActivePointerGrab(wxAPP_DISPLAY, 
                                 (ButtonPressMask | ButtonReleaseMask
                                  | ButtonMotionMask | PointerMotionMask | PointerMotionHintMask
                                  | EnterWindowMask | LeaveWindowMask),
                                 c, 
                                 grabbing_panel_time);
         }
       }
      }
    }
  }
  
  return previous;
}

Here is the call graph for this function:

void wxWindow::SetFocus ( void  ) [virtual]

Definition at line 936 of file Window.cc.

{
  wxWindow *win;

  if (!X->frame) // forbid, if no widget associated
    return;

  if (IsGray() || !IsShown())
    return;

  if (!WantsFocus())
    return;

  if (misc_flags & FOCUS_FLAG)
    /* focus is already here */
    return;

  // search for the frame of this widget
  win = this;
  for (/*wxWindow *win = this*/; win; win = win->parent) {
    if (wxSubType(win->__type, wxTYPE_FRAME))
      break;
  }

  // if found: set focus
  if (win)
    XtSetKeyboardFocus(win->X->frame, X->frame);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::SetLabel ( char *  label) [virtual]

Reimplemented in wxRadioBox, wxButton, wxMessage, and wxCheckBox.

Definition at line 251 of file Window.cc.

{
  char *oldlabel = NULL;

  if (!X->frame) // forbid, if no widget associated
    return;

  XtVaGetValues(X->frame, XtNlabel, &oldlabel, NULL);
  if (oldlabel) {
    label = wxGetCtlLabel(label);
    XtVaSetValues(X->frame, XtNlabel, label, NULL);
  }
}

Here is the call graph for this function:

void wxWindow::SetName ( char *  name) [virtual]

Definition at line 265 of file Window.cc.

{
  // overwrite quark computed on widget creation
  XrmQuark q;
  q = XrmStringToName((name != NULL) ? name : "");
  X->handle->core.xrm_name = q;
}
void wxWindow::SetScrollArea ( int  hsize,
int  vsize 
) [virtual]

Definition at line 699 of file Window.cc.

{
    Dimension d;
    int wd, ht; 
    Position p, x, y;

    if ((gwd <= 0 && ght <= 0) || !X->scroll)
       return; // don't want to resize or window not scrollable

    // position of scrollable window
    XtVaGetValues(X->handle, XtNx, &x, XtNy, &y, NULL);
    // size of viewport
    XfwfCallComputeInside(X->scroll, &p, &p, &wd, &ht);
    // get missing sizes if any (gwd <0 || ght < 0)
    if (gwd < 0) { XtVaGetValues(X->handle, XtNwidth, &d, NULL);  gwd = d; }
    if (!gwd) gwd = 1;
    if (ght < 0) { XtVaGetValues(X->handle, XtNheight, &d, NULL); ght = d; }
    if (!ght) ght = 1;
    // compute correct (x,y)-position - 0<=x<=gwd-wd, 0<=y<=ght-ht
    x = min(x, gwd-wd); x = max(0, x);
    y = min(y, ght-ht); y = max(0, y); 
    // set size and reposition if necessary (x,y changed)
    XtVaSetValues(X->handle,
                XtNx,     x,              XtNy,      y,
                XtNwidth, (Dimension)gwd, XtNheight, (Dimension)ght,
                NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::SetScrollPage ( int  orient,
int  range 
) [virtual]

Definition at line 754 of file Window.cc.

{
  if (!(misc_flags & NO_AUTO_SCROLL_FLAG))
    return;
  
  if (range <= 0)
    range = 1;
  if (orient == wxHORIZONTAL) {
    if (!hs_width)
      hs_page = 1;
    else
      hs_page = range;
  } else {
    if (!vs_width)
      vs_page = 1;
    else
      vs_page = range;
  }

  xws_set_scroll_direct(X->scroll, hs_width, hs_page, hs_pos, vs_width, vs_page, vs_pos);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::SetScrollPos ( int  orient,
int  pos 
) [virtual]

Definition at line 727 of file Window.cc.

{
  if (!(misc_flags & NO_AUTO_SCROLL_FLAG))
    return;
  
  if (orient == wxHORIZONTAL)      wxWindow::Scroll(pos < 0 ? 0 : pos, -1);
  else                       wxWindow::Scroll(-1, pos < 0 ? 0 : pos);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::SetScrollRange ( int  orient,
int  range 
) [virtual]

Definition at line 736 of file Window.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 999 of file Window.cc.

{
  if (shown)
    misc_flags |= SHOWN_FLAG;
  else
    misc_flags -= (misc_flags & SHOWN_FLAG);
}

Here is the caller graph for this function:

void wxWindow::SetSize ( int  x,
int  y,
int  width,
int  height,
int  flags = wxSIZE_AUTO 
) [virtual]

Reimplemented in wxFrame, and wxListBox.

Definition at line 520 of file Window.cc.

{
  if ((x > -1) || ((flags & wxPOS_USE_MINUS_ONE) && (x > wxDEFAULT_POSITION)))
    wxLC_MEM(constraints->left, Absolute(x));
  if ((y > -1) || ((flags & wxPOS_USE_MINUS_ONE) && (y > wxDEFAULT_POSITION)))
    wxLC_MEM(constraints->top, Absolute(y));

  if (width > -1)
    wxLC_MEM(constraints->width, Absolute(width));
  else
    wxLC_MEM(constraints->width, AsIs());
  if (height > -1)
    wxLC_MEM(constraints->height, Absolute(height));
  else
    wxLC_MEM(constraints->height, AsIs());

  Configure(x, y, width, height, flags);
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxWindow::SetSize ( int  width,
int  height 
) [inline, virtual]

Reimplemented in wxFrame, and wxListBox.

Definition at line 104 of file Window.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::SetTitle ( char *  title) [virtual]

Reimplemented in wxFrame.

Definition at line 273 of file Window.cc.

{
    /* Note: widget must be realized */

    if (!X->frame) // forbid, if no widget associated
       return;

    if (!utf8_atom) {
      utf8_atom = XInternAtom(XtDisplay(X->frame), "UTF8_STRING", FALSE);
      net_wm_name_atom = XInternAtom(XtDisplay(X->frame), "_NET_WM_NAME", FALSE);
      net_wm_icon_name_atom = XInternAtom(XtDisplay(X->frame), "_NET_WM_ICON_NAME", FALSE);
    }

    /* Set title and icon title as string sintead fo utf-8. If
       a Window manager can handle UTF-8, we expect it to use the
       _NET variants. */
    XtVaSetValues(X->frame, 
                XtNtitle, title, 
                XtNiconName, title, 
                XtNtitleEncoding, XA_STRING,
                XtNiconNameEncoding, XA_STRING,
                NULL);

    {
      int i;
      for (i = 0; i < 2; i++) {
       XChangeProperty(XtDisplay(X->frame), XtWindow(X->frame),
                     !i ? net_wm_name_atom: net_wm_icon_name_atom,
                     utf8_atom,
                     8, PropModeReplace,
                     (unsigned char *)title, strlen(title));
      }
    }
}
virtual void wxWindow::SetUserEditMode ( Bool  edit) [inline, virtual]

Definition at line 149 of file Window.h.

{ user_edit_mode = edit; }
Bool wxWindow::Show ( Bool  show) [virtual]

Reimplemented in wxRadioBox, wxFrame, and wxDialogBox.

Definition at line 965 of file Window.cc.

{
    if (parent) {
      wxChildList *cl;
      cl = parent->GetChildren();
      cl->Show(this, show);
    }

    if (!X->handle) // forbid, if no widget associated
      return TRUE;

    if (!show)
      ReleaseAllFocus();

    /* Get rid of or restore focus traversal */
    if (XtIsSubclass(X->frame, xfwfCommonWidgetClass))
      XtVaSetValues(X->frame, XtNtraversalOn, (Boolean)show, NULL);

    /* Show/hide frame */
    if (show)
      XtManageChild(X->frame);
    else
      XtUnmanageChild(X->frame);

    SetShown(show);

    return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxWindow::ShowCaret ( Bool   WXUNUSEDshow) [inline, virtual]

Definition at line 116 of file Window.h.

{};
Bool wxWindow::WantsFocus ( void  ) [virtual]

Reimplemented in wxCanvas, and wxPanel.

Definition at line 2384 of file Window.cc.

{
  return TRUE;
}

Here is the caller graph for this function:


Friends And Related Function Documentation

void wxXSetBusyCursor ( wxWindow win,
wxCursor cursor 
) [friend]

Definition at line 74 of file BusyCursor.cc.

{
  Cursor c;
  wxChildNode *node;
  wxChildList *cl;

  if (cursor)
    c = GETCURSOR(cursor);
  else if (win->cursor)
    c = GETCURSOR(win->cursor);
  else
    c = GETCURSOR(wxSTANDARD_CURSOR);
  
  win->user_edit_mode = !!cursor;

  XtVaSetValues(win->X->handle, XtNcursor, c, NULL);
  if (win->__type == wxTYPE_LIST_BOX) {
    XtVaSetValues(XtParent(win->X->handle), XtNcursor, c, NULL);
  }

  cl = win->GetChildren();
  for (node = cl->First(); node; node = node->Next()) {
    wxWindow *child;
    child = (wxWindow *) node->Data ();
    if (wxSubType(child->__type, wxTYPE_FRAME))
      wxXSetBusyCursor(child, cursor);
    else
      wxXSetNoCursor(child, cursor);
  }
}
void wxXSetNoCursor ( wxWindow win,
wxCursor cursor 
) [friend]

Definition at line 39 of file BusyCursor.cc.

{
  Cursor c;
  Cursor cc;
  wxChildList *cl;
  wxChildNode *node;

  if (cursor || !win->cursor)
    c = None;
  else
    c = GETCURSOR(win->cursor);

  win->user_edit_mode = !!cursor;

  XtVaGetValues(win->X->handle, XtNcursor, &cc, NULL);
  if (cc != c) {
    XtVaSetValues(win->X->handle, XtNcursor, c, NULL);
    if (win->__type == wxTYPE_LIST_BOX) {
      XtVaSetValues(XtParent(win->X->handle), XtNcursor, c, NULL);
    }
  }
  
#ifdef MZ_PRECISE_GC
  if (win->__type == wxTYPE_MENU_BAR)
    return;
#endif

  cl = win->GetChildren();
  for (node = cl->First(); node; node = node->Next()) {
    wxWindow *child;
    child = (wxWindow *) node->Data ();
    wxXSetNoCursor(child, cursor);
  }
}

Member Data Documentation

Definition at line 146 of file wxGC.h.

WXTYPE wxObject::__type [inherited]

Definition at line 77 of file Object.h.

Definition at line 221 of file Window.h.

Bool wxWindow::captured [protected]

Definition at line 222 of file Window.h.

Definition at line 212 of file Window.h.

Definition at line 214 of file Window.h.

Definition at line 218 of file Window.h.

unsigned long wxWindow::current_state [protected]

Definition at line 234 of file Window.h.

wxCursor* wxWindow::cursor [protected]

Definition at line 215 of file Window.h.

wxWindowDC* wxWindow::dc [protected]

Definition at line 209 of file Window.h.

Definition at line 230 of file Window.h.

Definition at line 223 of file Window.h.

wxFont* wxWindow::font [protected]

Definition at line 216 of file Window.h.

long wxWindow::hs_page [protected]

Definition at line 240 of file Window.h.

long wxWindow::hs_pos [protected]

Definition at line 240 of file Window.h.

long wxWindow::hs_width [protected]

Definition at line 240 of file Window.h.

short wxWindow::internal_disabled [protected]

Definition at line 236 of file Window.h.

Definition at line 237 of file Window.h.

long wxWindow::misc_flags [protected]

Definition at line 232 of file Window.h.

Definition at line 224 of file Window.h.

wxWindow* wxWindow::parent [protected]

Definition at line 211 of file Window.h.

wxWindow** wxWindow::saferef [protected]

Definition at line 228 of file Window.h.

long wxWindow::style [protected]

Definition at line 226 of file Window.h.

Definition at line 225 of file Window.h.

long wxWindow::vs_page [protected]

Definition at line 240 of file Window.h.

long wxWindow::vs_pos [protected]

Definition at line 240 of file Window.h.

long wxWindow::vs_width [protected]

Definition at line 240 of file Window.h.

wxWindow_Xintern* wxWindow::X [protected]

Definition at line 207 of file Window.h.

int wxWindow::xoff [protected]

Definition at line 219 of file Window.h.

int wxWindow::yoff [protected]

Definition at line 219 of file Window.h.


The documentation for this class was generated from the following files: