Back to index

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

#include <DialogBox.h>

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

List of all members.

Public Member Functions

 wxDialogBox (void)
 wxDialogBox (wxWindow *parent, char *title, Bool modal=FALSE, int x=-1, int y=-1, int width=500, int height=500, long style=wxDEFAULT_DIALOG_STYLE, char *name="dialogBox")
Bool Create (wxFrame *parent, char *title, Bool modal=FALSE, int x=-1, int y=-1, int width=500, int height=500, long style=wxDEFAULT_DIALOG_STYLE, char *name="dialogBox")
Bool Show (Bool show)
Bool ModalShowing ()
Bool Create (wxFrame *parent, char *title, int x=-1, int y=-1, int width=-1, int height=-1, int style=wxDEFAULT_FRAME, char *name="frame")
Bool Create (wxPanel *parent, int x=-1, int y=-1, int width=-1, int height=-1, int style=0, char *name="panel")
virtual void Fit (void)
virtual void Layout (void)
virtual void GetClientSize (int *width, int *height)
virtual void SetClientSize (int width, int height)
virtual void SetSize (int width, int height)
virtual void SetSize (int x, int y, int width, int height, int flags=wxSIZE_AUTO)
void CreateStatusLine (int number=1, char *name="status_line")
void SetStatusText (char *text, int number=0)
Bool StatusLineExists (void)
void Iconize (Bool iconize)
Bool Iconized (void)
void Maximize (Bool maximize)
Bool IsMaximized ()
wxMenuBarGetMenuBar (void)
void SetIcon (wxBitmap *icon, wxBitmap *bg=NULL, int kind=0)
void SetMenuBar (wxMenuBar *menubar)
void Command (int id)
void LoadAccelerators (char *WXUNUSED(resource))
virtual void OnMenuSelect (long id)
virtual void OnMenuSelect (long WXUNUSED(cmd))
virtual void OnMenuClick ()
virtual void OnMDIActivate (Bool flag)
virtual void OnToolbarButton ()
void SetFrameModified (Bool mod)
virtual char * GetTitle (void)
virtual void SetTitle (char *title)
virtual void GetPosition (int *x, int *y)
virtual void GetSize (int *width, int *height)
void EnforceSize (int minw, int minh, int maxw, int maxh, int incw=1, int inch=1)
int GetLabelPosition (void)
void SetLabelPosition (int position)
void GetCursor (int *x, int *y)
void SetItemCursor (int x, int y)
int GetHorizontalSpacing (void)
int GetVerticalSpacing (void)
void NewLine (int pixels=0)
void PositionItem (wxWindow *win, int x, int y, int width, int height)
void SetHorizontalSpacing (int sp)
void SetVerticalSpacing (int sp)
void Tab (int pixels=0)
wxButtonGetDefaultItem (void)
virtual void OnDefaultAction (wxItem *item)
virtual void OnDefaultAction (wxItem *WXUNUSED(initiatingItem))
wxPanelDCGetPanelDC (void)
virtual void ChangeToGray (Bool gray)
virtual void ReleaseAllFocus ()
virtual Bool WantsFocus (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 void SetLabel (char *label)
virtual void SetName (char *name)
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 GetRefreshSize (int *w, int *h)
virtual void Move (int x, int y)
virtual void ScreenToClient (int *x, int *y)
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 AllowDoubleClick (Bool allow)
virtual void CaptureMouse (void)
virtual void DragAcceptFiles (Bool accept)
virtual void Enable (Bool enable)
virtual void EnablePainting (Bool enable)
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 void SetUserEditMode (Bool edit)
virtual void OnChar (wxKeyEvent *event)
virtual void OnChar (wxKeyEvent *WXUNUSED(event))
virtual void OnCommand (wxWindow *win, wxCommandEvent *event)
virtual void OnCommand (wxWindow *WXUNUSED(win), wxCommandEvent *WXUNUSED(event))
virtual void OnEvent (wxMouseEvent *event)
virtual void OnEvent (wxMouseEvent *WXUNUSED(event))
virtual void OnPaint (void)
virtual void OnScroll (wxScrollEvent *event)
virtual void OnScroll (wxScrollEvent *WXUNUSED(event))
virtual Bool PreOnChar (wxWindow *, wxKeyEvent *)
virtual Bool PreOnEvent (wxWindow *, wxMouseEvent *)
wxWindowDCGetDC (void)
void MakeModal (int on)
void InternalEnable (Bool enable, Bool gray=FALSE)
void ReleaseFocus ()
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 Bool OnCharHook (wxKeyEvent *WXUNUSED(event))
virtual Bool OnClose (void)
virtual void OnDropFile (char *WXUNUSED(file))
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 OnMove (int WXUNUSED(x), int WXUNUSED(y))
virtual void OnRightClick (int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(keys))
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

voidcontext
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

wxMenuBarmenubar
wxMessage ** status
int num_status
wxBitmapframe_icon
wxBitmapframe_mask
Bool show_as_mod
long last_shown_time
wxButtondefault_item
int label_pos
int cursor_x
int cursor_y
int h_space
int v_space
int v_line_extent
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

Private Attributes

wxListrestore_disabled_windows

Friends

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

Detailed Description

Definition at line 34 of file DialogBox.h.


Constructor & Destructor Documentation

Definition at line 37 of file DialogBox.cc.

wxDialogBox::wxDialogBox ( wxWindow parent,
char *  title,
Bool  modal = FALSE,
int  x = -1,
int  y = -1,
int  width = 500,
int  height = 500,
long  style = wxDEFAULT_DIALOG_STYLE,
char *  name = "dialogBox" 
)

Definition at line 42 of file DialogBox.cc.

    : wxFrame()
{
    __type = wxTYPE_DIALOG_BOX;

    style |= wxTRANSIENT;

    Create((wxFrame *)parent, title, _modal, x, y, width, height, style, name);
}

Here is the call graph for this function:


Member Function Documentation

void wxWindow::AddChild ( wxWindow child) [inherited]

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:

void wxWindow::AddEventHandlers ( void  ) [protected, inherited]

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, inherited]

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, inherited]

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, inherited]

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, inherited]

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, inherited]

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 wxPanel::ChangeToGray ( Bool  gray) [virtual, inherited]

Reimplemented from wxWindow.

Definition at line 189 of file Panel.cc.

{
  wxChildNode *cn;
  wxChildList *cl;
  wxWindow::ChangeToGray(gray);
  cl = GetChildren();
  for (cn = cl->First(); cn; cn = cn->Next()) {
    wxWindow *w;
    w = (wxWindow *)cn->Data();
    w->InternalEnable(!gray, TRUE);
  }
}

Here is the call graph for this function:

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

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 wxFrame::Command ( int  id) [inherited]

Definition at line 684 of file Frame.cc.

{
  OnMenuCommand(id);
}

Here is the call graph for this function:

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

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:

Bool wxDialogBox::Create ( wxFrame parent,
char *  title,
Bool  modal = FALSE,
int  x = -1,
int  y = -1,
int  width = 500,
int  height = 500,
long  style = wxDEFAULT_DIALOG_STYLE,
char *  name = "dialogBox" 
)

Definition at line 53 of file DialogBox.cc.

{
    style |= wxTRANSIENT;

    (void)wxFrame::Create(parent, title, x, y, width, height, style, name);

    return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool wxPanel::Create ( wxPanel parent,
int  x = -1,
int  y = -1,
int  width = -1,
int  height = -1,
int  style = 0,
char *  name = "panel" 
) [inherited]

Definition at line 75 of file Panel.cc.

{
    wxWindow_Xintern *ph;
    Widget wgt;
    wxFont *fnt;

    if (!panel)
       wxFatalError("wxPanel created without a parent!");
    parent = panel;
    parent->AddChild(this);

    style         = _style;

    ph = parent->GetHandle();

    fnt = wxNORMAL_FONT;

    // create frame
    wgt = XtVaCreateWidget
       (name, xfwfEnforcerWidgetClass, ph->handle,
        XtNbackground,  wxGREY_PIXEL,
        XtNforeground,  wxBLACK_PIXEL,
        XtNfont,        fnt->GetInternalFont(),
        XtNhighlightThickness, 0,
        NULL);
    if (!(style & wxINVISIBLE))
      XtManageChild(wgt);
    else
      XtRealizeWidget(wgt);
    X->frame = wgt;
    // internal representation
    if (style & wxBORDER) {
      wgt = XtVaCreateManagedWidget("panel", xfwfBoardWidgetClass, X->frame,
                                XtNbackground, wxGREY_PIXEL,
                                XtNframeWidth, 2,
                                XtNframeType, XfwfSunken,
                                NULL);
      X->handle = wgt;
      xoff = yoff = 4; // offset for border
    } else {
      wgt = XtVaCreateManagedWidget("panel", xfwfBoardWidgetClass, X->frame,
                                XtNbackground, wxGREY_PIXEL,
                                XtNhighlightThickness, 0,
                                NULL);
      X->handle = wgt;
    }

    // In case this window or the parent is hidden; we
    // need windows to create DCs
    XtRealizeWidget(X->frame);
    XtRealizeWidget(X->handle);


    // position in panel/frame
    panel->PositionItem(this, x, y, width, height);
    // add event handlers
    AddEventHandlers();

    if (style & wxINVISIBLE)
      Show(FALSE);

    // ready
    return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool wxFrame::Create ( wxFrame parent,
char *  title,
int  x = -1,
int  y = -1,
int  width = -1,
int  height = -1,
int  style = wxDEFAULT_FRAME,
char *  name = "frame" 
) [inherited]

Definition at line 168 of file Frame.cc.

{
    Widget parent_widget, wgt;
    wxChildList *tlf;
    Atom WM_DELETE_WINDOW;

    context = wxGetContextForFrame();

    // chain child <-> parent
    if ((parent = frame_parent)) {
      wxWindow_Xintern *ph;
      ph = frame_parent->GetHandle();
      parent_widget = ph->frame;
      parent->AddChild(this);
    } else {
       parent_widget = wxAPP_TOPLEVEL;
    }
    tlf = wxTopLevelFrames(this);
    tlf->Append(this);
    tlf->Show(this, FALSE);

    // create top level or transient shell
    if ( (style = _style) & wxTRANSIENT ) {
      // create transient shell with WM_TRANSIENT_FOR property
      wxWindow *p;
      Widget pw;

      for (p = parent; p; p = p->GetParent()) {
       if (wxSubType(p->__type, wxTYPE_FRAME)
           && !(p->GetWindowStyleFlag() & wxTRANSIENT)) // frame must not be transient
         break;
      }
      if (p) {
       wxWindow_Xintern *ph;
       ph = p->GetHandle();
       pw = ph->frame;
      } else
       pw = wxAPP_TOPLEVEL;
      X->frame = XtVaCreatePopupShell
       (name ? name : "shell", transientShellWidgetClass, parent_widget,
        XtNsaveUnder, FALSE,
        XtNtransientFor, pw,
        XtNvisual, wxAPP_VISUAL,
        XtNdepth, wx_visual_depth,
        XtNcolormap, wx_default_colormap,
        NULL);
    } else {
      // create top level shell
      X->frame = XtVaCreatePopupShell
       (name ? name : "shell", 
        (((style & wxFLOAT_FRAME)  && (style & wxNO_CAPTION))
         ? overrideShellWidgetClass 
         : topLevelShellWidgetClass), 
        parent_widget, 
        XtNvisual, wxAPP_VISUAL,
        XtNdepth, wx_visual_depth,
        XtNcolormap, wx_default_colormap,
        NULL);
    }
    // set common data
    SetSize(x, y, width, height, wxSIZE_AUTO | wxPOS_USE_MINUS_ONE);
    // create board widget
    wgt = XtVaCreateManagedWidget(
       name, xfwfBoardWidgetClass, X->frame,
       XtNhighlightThickness, 0,
       XtNbackground, wxGREY_PIXEL,
       NULL);
    X->handle = wgt;
    AddEventHandlers();

    XtRealizeWidget(X->frame);
    SetTitle(title);
    // make a WM_PROTOCOLS atom if necessary
    XInternAtom(XtDisplay(X->frame), "WM_PROTOCOLS", False);
    // make a WM_DELETE_WINDOW atom
    WM_DELETE_WINDOW = XInternAtom(XtDisplay(X->frame),
                               "WM_DELETE_WINDOW",
                               False);
    XSetWMProtocols(XtDisplay(X->frame),
                  XtWindow(X->frame),
                  &WM_DELETE_WINDOW,
                  1);

    /* part of show-&-hide fix */
    XtAddEventHandler(X->frame, StructureNotifyMask,
                    False, (XtEventHandler)wxFrameMapProc,
                    (XtPointer)saferef);

    cursor = wxSTANDARD_CURSOR;

    if (wxIsBusy())
      wxXSetBusyCursor(this, wxHOURGLASS_CURSOR);

    if ((_style & wxNO_RESIZE_BORDER)
       || (_style & wxNO_CAPTION)) {
      /* Copied off a newsgroup somewhere: */
      Atom WM_HINTS;
      Display *display;
      Window window;

      display = XtDisplay(X->frame);
      window = XtWindow(X->frame);

      /* First try to set MWM hints */
      WM_HINTS = XInternAtom(display, "_MOTIF_WM_HINTS", True);
      if ( WM_HINTS != None ) {
#define MWM_HINTS_DECORATIONS (1L << 1)
       wxMWM_Hints MWMHints = { MWM_HINTS_DECORATIONS, 0, 0, 0, 0 };
       
       if (!(_style & wxNO_RESIZE_BORDER)
           || !(_style & wxNO_CAPTION))
         MWMHints.decorations |= MWM_DECOR_BORDER;

       if (!(_style & wxNO_RESIZE_BORDER))
         MWMHints.decorations |= (MWM_DECOR_RESIZEH
                               | MWM_DECOR_MINIMIZE
                               | MWM_DECOR_MAXIMIZE);

       if (!(_style & wxNO_CAPTION))
         MWMHints.decorations |= (MWM_DECOR_TITLE
                               | MWM_DECOR_MENU);

       XChangeProperty(display, window, WM_HINTS, WM_HINTS, 32,
                     PropModeReplace, (unsigned char *)&MWMHints,
                     sizeof(MWMHints)/sizeof(long));
      }
      /* Now try to set KWM hints */
      if (_style & wxNO_CAPTION) {
       WM_HINTS = XInternAtom(display, "KWM_WIN_DECORATION", True);
       if ( WM_HINTS != None ) {
         long KWMHints = 0;
         
         if (!(_style & wxNO_RESIZE_BORDER))
           KWMHints = 2; /* tiny decoration */
         
         XChangeProperty(display, window, WM_HINTS, WM_HINTS, 32,
                       PropModeReplace, (unsigned char *)&KWMHints,
                       sizeof(KWMHints)/sizeof(long));
       }
      }
      /* Now try to set GNOME hints */
      if ((_style & wxNO_RESIZE_BORDER)
         && (_style & wxNO_CAPTION)) {
       WM_HINTS = XInternAtom(display, "_WIN_HINTS", True);
       if (WM_HINTS != None) {
         long GNOMEHints = 0;
         
         XChangeProperty(display, window, WM_HINTS, XA_CARDINAL, 32,
                       PropModeReplace, (unsigned char *)&GNOMEHints,
                       sizeof(GNOMEHints)/sizeof(long));
       }
      }
    }


    if ((x > wxDEFAULT_POSITION) && (y > wxDEFAULT_POSITION)) {
      /* Tell the window manager that we really meant the initial position: */
      XSizeHints hints;
      hints.flags = USPosition;
      if ((width >= 0) && (height >= 0))
       hints.flags |= USSize;
      hints.x = x;
      hints.y = y;
      hints.width = width;
      hints.height = height;
      XSetWMNormalHints(XtDisplay(X->frame), XtWindow(X->frame), &hints);
    }

    if (!plt_mask) {
      plt_mask = XCreateBitmapFromData(wxAPP_DISPLAY, wxAPP_ROOT, plt_xbm, plt_width, plt_height);
    }
    if (!plt_icon) {
      XpmAttributes *xpm;
#ifdef MZ_PRECISE_GC
      xpm = (XpmAttributes *)GC_malloc_atomic(sizeof(XpmAttributes));
#else
      xpm = new WXGC_ATOMIC XpmAttributes;
#endif
      xpm->valuemask = (XpmReturnInfos | XpmReturnPixels | XpmCloseness
                     | XpmVisual | XpmDepth | XpmColormap);
      xpm->closeness = 40000;
      xpm->visual = wxAPP_VISUAL;
      xpm->depth = wx_visual_depth;
      xpm->colormap = wx_default_colormap;
      if (XpmCreatePixmapFromData(wxAPP_DISPLAY, wxAPP_ROOT,
                              plt_xpm, &plt_icon,
                              (Pixmap*)NULL, xpm)
         != XpmSuccess)
       plt_icon = (Pixmap)NULL;
    }

    if ((style & wxTRANSIENT) && frame_parent) {
      /* Dialog: use parent frame's icon. */
      Pixmap icon, mask;

      XtVaGetValues(frame_parent->X->frame, 
                  XtNiconMask, &mask, 
                  XtNiconPixmap, &icon, NULL);

      if (mask && icon) {
       XtVaSetValues(X->frame, XtNiconMask, mask, NULL);
       XtVaSetValues(X->frame, XtNiconPixmap, icon, NULL);
      }
    } else {
      if (plt_mask && plt_icon) {
       XtVaSetValues(X->frame, XtNiconMask, plt_mask, NULL);
       XtVaSetValues(X->frame, XtNiconPixmap, plt_icon, NULL);
      }
    }

    /* Let window managers know that the frame can receive the focus
       (patch from Alexey Voinov): */
    XtVaSetValues(X->frame, XtNinput, True, NULL);

    return TRUE;
}

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, inherited]

Definition at line 113 of file Window.h.

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

Definition at line 114 of file Window.h.

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

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:

void wxFrame::CreateStatusLine ( int  number = 1,
char *  name = "status_line" 
) [inherited]

Definition at line 573 of file Frame.cc.

{
    if (StatusLineExists())
       return;

    status = new WXGC_PTRS wxMessage* [num_status = min(number, wxMAX_STATUS)];
    for (int i = 0; i < num_status; ++i) {
       wxLayoutConstraints *constr;
       int ww, hh;
       wxMessage *sm;
       wxWindow **sr;

       sm = DEBUG_NEW wxMessage(this, "", 0, 0, wxBORDER, NULL, "status");
       status[i] = sm;
       sm->AllowResize(FALSE);
       sm->SetAlignment(wxALIGN_LEFT);
       sm->GetSize(&ww, &hh);
       constr = DEBUG_NEW wxLayoutConstraints;
       sr = GetWinSafeRef();
       wxLC_MEM(constr->left, PercentOf(sr, wxWidth, i*(100/num_status)));
       wxLC_MEM(constr->top, Below(sr, 0)); // wxBottom of client area
       wxLC_MEM(constr->height, Absolute(hh));
       if (i != num_status-1) {
         wxLC_MEM(constr->width, PercentOf(sr, wxWidth, 100 / num_status));
       } else {
         wxLC_MEM(constr->right, SameAs(sr, wxRight, 0));
         wxLC_MEM(constr->width, Unconstrained());
       }
       status[i]->SetConstraints(constr);

    }

    Layout();
}

Here is the call graph for this function:

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

Definition at line 115 of file Window.h.

{};
void wxWindow::DestroyChildren ( void  ) [inherited]

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, inherited]

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, inherited]

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, inherited]

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, inherited]

Definition at line 139 of file Window.h.

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

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:

void wxFrame::EnforceSize ( int  minw,
int  minh,
int  maxw,
int  maxh,
int  incw = 1,
int  inch = 1 
) [inherited]

Definition at line 497 of file Frame.cc.

{
  XSizeHints sh;
  int x, y;

  if (minw < 0)
    minw = 0;
  if (minh < 0)
    minh = 0;
  if (maxw < 0)
    maxw = 32000;
  if (maxh < 0)
    maxh = 32000;

  sh.flags = (PMinSize | PMaxSize | PResizeInc | USPosition);
  sh.min_width = minw;
  sh.min_height = minh;
  sh.max_width = maxw;
  sh.max_height = maxh;
  sh.width_inc = incw;
  sh.height_inc = inch;

  GetPosition(&x, &y);
  sh.x = x;
  sh.y = y;

  XSetWMNormalHints(XtDisplay(X->frame), 
                  XtWindow(X->frame),
                  &sh);
}

Here is the call graph for this function:

void wxFrame::Fit ( void  ) [virtual, inherited]

Reimplemented from wxPanel.

Definition at line 435 of file Frame.cc.

{
    int hsize=0, vsize=0;

    if (children) {
        wxChildNode *node;
       for (node = children->First(); node; node = node->Next()) {
           wxWindow *child;
           child = (wxWindow*)(node->Data());
           if (child) {
              // skip menubar and status line for computation
              int x, y, w, h;
              int i=0;
              for ( /* i=0 */; i<num_status; ++i) {
                if (child == status[i])
                  break;
              }
              if (child == menubar || i < num_status) {
                continue;
              }
              // compute maximal size
              child->GetPosition(&x, &y); child->GetSize(&w, &h);
              hsize = max(hsize, x + w);
              vsize = max(vsize, y + h);
           }
       }
       hsize -= xoff; vsize -= yoff;
    } else {
       hsize = PANEL_HMARGIN;
       vsize = PANEL_VMARGIN;
    }
    hsize += /* PANEL_HMARGIN + */ (style & wxBORDER ? 4 : 0 );
    vsize += /* PANEL_VMARGIN + */ (style & wxBORDER ? 4 : 0 );
    SetClientSize(hsize, vsize);
}

Here is the call graph for this function:

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

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 
) [inherited]

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, inherited]

Definition at line 118 of file Window.h.

{};
wxChildList* wxWindow::GetChildren ( void  ) [inline, inherited]

Definition at line 77 of file Window.h.

{ return children; }

Here is the caller graph for this function:

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

Reimplemented from wxPanel.

Definition at line 474 of file Frame.cc.

{
    int dummy, h1=0, h2=0, i;

    GetSize(width, height);
    if (menubar)  menubar->GetSize(&dummy, &h1);   // get menubar's height
    for (i = 0; i < num_status; i++) {
      status[i]->GetSize(&dummy, &h2); // get status lines's height
      h1 += h2;
    }
    *height -= h1;                            // adjust height
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 130 of file Window.h.

        { return constraints; }

Here is the caller graph for this function:

void wxPanel::GetCursor ( int x,
int y 
) [inherited]

Definition at line 219 of file Panel.cc.

{
    *x = cursor_x; *y = cursor_y;
}
wxWindowDC * wxWindow::GetDC ( void  ) [inherited]

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:

wxButton* wxPanel::GetDefaultItem ( void  ) [inline, inherited]

Definition at line 67 of file Panel.h.

{ return default_item; }

Here is the caller graph for this function:

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

Definition at line 178 of file Window.h.

{ return font; }
wxWindow * wxWindow::GetGrandParent ( void  ) [inherited]

Definition at line 187 of file Window.cc.

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

Definition at line 75 of file Window.h.

{ return X; }

Here is the caller graph for this function:

int wxPanel::GetHorizontalSpacing ( void  ) [inline, inherited]

Definition at line 59 of file Panel.h.

{ return h_space; }
char * wxWindow::GetLabel ( void  ) [virtual, inherited]

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;
}
int wxPanel::GetLabelPosition ( void  ) [inline, inherited]

Definition at line 54 of file Panel.h.

{ return label_pos; }

Here is the caller graph for this function:

wxMenuBar * wxFrame::GetMenuBar ( void  ) [inherited]

Definition at line 623 of file Frame.cc.

{
    return menubar;
}
char * wxWindow::GetName ( void  ) [virtual, inherited]

Definition at line 232 of file Window.cc.

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

    return XtName(X->handle);
}
wxPanelDC* wxPanel::GetPanelDC ( void  ) [inline, inherited]

Definition at line 71 of file Panel.h.

{ return dc; }
wxWindow* wxWindow::GetParent ( void  ) [inline, inherited]

Definition at line 79 of file Window.h.

{ return parent; }

Here is the caller graph for this function:

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

Reimplemented from wxWindow.

Definition at line 414 of file Frame.cc.

{
  if (X->frame && XtIsRealized(X->frame)) {
    /* Get the actual window position, instead of waiting for events
       to update the widget */
    Display *disp;
    Window win;
    Window child;

    disp = XtDisplay(X->frame);
    win = XtWindow(X->frame);

    XTranslateCoordinates(disp, 
                       win, 
                       DefaultRootWindow(disp),
                       0, 0, 
                       x, y, &child);
  } else
    wxWindow::GetPosition(x, y);
}

Here is the caller graph for this function:

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

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, inherited]

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, inherited]

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, inherited]

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, inherited]

Definition at line 174 of file Window.h.

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

Reimplemented from wxWindow.

Definition at line 391 of file Frame.cc.

{
  if (X->frame && XtIsRealized(X->frame)) {
    /* Get the actual window size, insteda of waiting for events
       to update the widget */
    int x_pos, y_pos;
    unsigned int border, depth;
    Window root;
    Display *disp;
    Window win;

    disp = XtDisplay(X->frame);
    win = XtWindow(X->frame);
    
    XGetGeometry(disp, win,
               &root, &x_pos, &y_pos,
               (unsigned int *)width, (unsigned int *)height,
               &border, &depth);
  } else
    wxWindow::GetSize(width, height);

}

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, inherited]

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 * wxFrame::GetTitle ( void  ) [virtual, inherited]

Reimplemented from wxWindow.

Definition at line 791 of file Frame.cc.

{
  char *t;
  t = wxWindow::GetTitle();
  if (t && show_as_mod) {
    int len;
    len = strlen(t);
    /* Double-check for asterisk: */
    if (len && t[len-1] == '*') {
      char *s;
      s = copystring(t);
      s[len-1] = 0;
      t = s;
    }
  }
  return t;
}

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Bool wxWindow::GetUserEditMode ( void  ) [inline, virtual, inherited]

Definition at line 141 of file Window.h.

{ return user_edit_mode; }
int wxPanel::GetVerticalSpacing ( void  ) [inline, inherited]

Definition at line 60 of file Panel.h.

{ return v_space; }
long wxWindow::GetWindowHandle ( ) [inherited]

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, inherited]

Definition at line 142 of file Window.h.

{ return style; }

Here is the caller graph for this function:

wxWindow** wxWindow::GetWinSafeRef ( ) [inline, inherited]

Definition at line 176 of file Window.h.

{ return saferef; }

Here is the caller graph for this function:

void wxFrame::Iconize ( Bool  iconize) [inherited]

Definition at line 532 of file Frame.cc.

{
  if (!IsShown())
    return;
  
  if (iconize) {
    XIconifyWindow(XtDisplay(X->frame), 
                 XtWindow(X->frame), 
                 XScreenNumberOfScreen(XtScreen(X->frame)));
  } else {
    XtMapWidget(X->frame);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool wxFrame::Iconized ( void  ) [inherited]

Definition at line 546 of file Frame.cc.

{
  XWindowAttributes wa;

  if (!IsShown())
    return FALSE;

  XSync(XtDisplay(X->frame), FALSE);

  XGetWindowAttributes(XtDisplay(X->frame), XtWindow(X->frame), &wa);

  return (wa.map_state == IsUnmapped);
}

Here is the call 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 
) [inherited]

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:

Bool wxWindow::IsGray ( void  ) [inherited]

Definition at line 828 of file Window.cc.

Here is the caller graph for this function:

Bool wxFrame::IsMaximized ( ) [inherited]

Definition at line 564 of file Frame.cc.

{
  return FALSE;
}
Bool wxWindow::IsShown ( void  ) [inherited]

Definition at line 994 of file Window.cc.

{
  return !!(misc_flags & SHOWN_FLAG);
}

Here is the caller graph for this function:

void wxFrame::Layout ( void  ) [virtual, inherited]

Reimplemented from wxPanel.

Definition at line 597 of file Layout.cc.

{
    wxWindow *one_child   = NULL;
    int      num_children = 0;
    wxWindow *child;
    wxChildNode *node;

    // check if frame has only ONE child
    if (children) {
      for (node = children->First(); node; node = node->Next()) {
       child = (wxWindow*)(node->Data());
       if ( child && !wxSubType(child->__type, wxTYPE_FRAME) ) {
         // skip menubar and status line for computation
         int i;
         for (i = 0; i < num_status; i++) {
           if (child == (wxWindow*)status[i])
             break;
         }
         if (child == (wxWindow*)menubar || i < num_status) {
           continue;
         }
         one_child = child; ++num_children;
       }
      }
    }

    // ONE child shall fit into frame
    if (num_children == 1) {
      int ww, hh;
      GetClientSize(&ww, &hh);
      one_child->SetSize(/* PANEL_HMARGIN */ 0, /* PANEL_VMARGIN */ 0,
                      ww /* -2*PANEL_HMARGIN */, hh /*-2*PANEL_VMARGIN */);
    }

    // layout window (necessary for ONE child too because of menubar and status)
    wxWindow::Layout();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxFrame::LoadAccelerators ( char *  WXUNUSEDresource) [inline, inherited]

Definition at line 75 of file Frame.h.

{}
void wxWindow::MakeModal ( int  on) [inherited]
void wxFrame::Maximize ( Bool  maximize) [inherited]

Definition at line 560 of file Frame.cc.

{
}

Definition at line 47 of file DialogBox.h.

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

Definition at line 98 of file Window.h.

Here is the call graph for this function:

Here is the caller graph for this function:

void wxPanel::NewLine ( int  pixels = 0) [inherited]

Definition at line 229 of file Panel.cc.

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, inherited]

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, inherited]

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.

{};
void wxPanel::OnDefaultAction ( wxItem item) [virtual, inherited]

Definition at line 265 of file Panel.cc.

{
  wxButton *but;
  but = GetDefaultItem();
  if (but) {
    wxCommandEvent *event;
    event = new wxCommandEvent(wxEVENT_TYPE_BUTTON_COMMAND);
    but->Command(event);
  }
}

Here is the call graph for this function:

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, inherited]

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.

                                                    {};
void wxFrame::OnMDIActivate ( Bool  flag) [virtual, inherited]

Reimplemented in os_wxFrame.

Definition at line 842 of file Frame.cc.

{
}

Here is the caller graph for this function:

void wxFrame::OnMenuClick ( ) [virtual, inherited]

Reimplemented in os_wxFrame.

Definition at line 834 of file Frame.cc.

{
}

Here is the caller graph for this function:

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.

{};
void wxFrame::OnMenuSelect ( long  id) [virtual, inherited]

Definition at line 829 of file Frame.cc.

Here is the call graph for this function:

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

Definition at line 64 of file EvtHandler.h.

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

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, inherited]

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 wxFrame::OnToolbarButton ( ) [virtual, inherited]

Reimplemented in os_wxFrame.

Definition at line 838 of file Frame.cc.

{
}

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, inherited]

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, inherited]

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:

void wxPanel::PositionItem ( wxWindow win,
int  x,
int  y,
int  width,
int  height 
) [inherited]

Definition at line 236 of file Panel.cc.

{
    // position child
    item->Move((x<0 ? cursor_x : x), (y<0 ? cursor_y : y));
    // move cursor and compute height of line
    item->SetSize(width, height);
    item->GetSize(&width, &height);
    if (x < 0)       cursor_x += width + h_space;
    if (y < 0) v_line_extent = max(v_line_extent, height);

    /* MATTHEW: Non-neg also sets cursor */
    if (x > 0 && (x + width > cursor_x))
      cursor_x = x + width + h_space;
    if (y > 0 && (y > cursor_y))
      cursor_y = y;

    if (IsGray())
      item->InternalEnable(0, TRUE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool wxWindow::PreOnChar ( wxWindow ,
wxKeyEvent  
) [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 1098 of file Window.cc.

{
  return FALSE;
}

Here is the caller graph for this function:

Bool wxWindow::PreOnEvent ( wxWindow ,
wxMouseEvent  
) [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 1103 of file Window.cc.

{
  return FALSE;
}

Here is the caller graph for this function:

void wxWindow::Refresh ( void  ) [virtual, inherited]

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:

void wxPanel::ReleaseAllFocus ( ) [virtual, inherited]

Reimplemented from wxWindow.

Definition at line 202 of file Panel.cc.

{
  wxChildNode *cn;
  wxChildList *cl;
  cl = GetChildren();
  for (cn = cl->First(); cn; cn = cn->Next()) {
    wxWindow *w;
    w = (wxWindow *)cn->Data();
    w->ReleaseAllFocus();
  }
  ReleaseFocus();
}

Here is the call graph for this function:

void wxWindow::ReleaseFocus ( ) [inherited]

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, inherited]

Definition at line 925 of file Window.cc.

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

    if (captured) {
       XtRemoveGrab(X->frame);
       captured = FALSE;
    }
};
void wxWindow::RemoveChild ( wxWindow child) [inherited]

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, inherited]

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, inherited]

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, inherited]

Definition at line 117 of file Window.h.

{};
void wxFrame::SetClientSize ( int  width,
int  height 
) [virtual, inherited]

Reimplemented from wxWindow.

Definition at line 487 of file Frame.cc.

{
    int dummy, h1=0, h2=0;

    if (menubar)  menubar->GetSize(&dummy, &h1);   // get menubar's height
    if (status)   status[0]->GetSize(&dummy, &h2); // get status lines's height
    height += h1 + h2;                                // adjust height
    wxWindow::SetClientSize(width, height);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::SetConstraints ( wxLayoutConstraints constr) [virtual, inherited]

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, inherited]

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, inherited]

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 wxFrame::SetFrameModified ( Bool  mod) [inherited]

Definition at line 780 of file Frame.cc.

{
  if (!!show_as_mod != !!mod) {
    char *t;
    t = GetTitle();
    t = copystring(t);
    show_as_mod = mod;
    SetTitle(t);
  }
}

Here is the call graph for this function:

void wxPanel::SetHorizontalSpacing ( int  sp) [inline, inherited]

Definition at line 63 of file Panel.h.

{ h_space = sp; }
void wxFrame::SetIcon ( wxBitmap icon,
wxBitmap bg = NULL,
int  kind = 0 
) [inherited]

Definition at line 628 of file Frame.cc.

{
  if (kind == 2) /* large */
    return;

  if (icon->Ok()) {
    wxBitmap *bm;
    int w, h;

    w = icon->GetWidth();
    h = icon->GetHeight();
    bm = new wxBitmap(w, h);
    if (bm->Ok()) {
      wxMemoryDC *mdc;
      Pixmap pm;

      mdc = new wxMemoryDC();
      mdc->SelectObject(bm);
      mdc->Blit(0, 0, w, h, icon, 0, 0, wxSTIPPLE, NULL);
      mdc->SelectObject(NULL);

      if (mask && !mask->Ok())
       mask = NULL;
      
      pm = mask ? GETPIXMAP(mask) : (Pixmap)NULL;
      XtVaSetValues(X->frame, XtNiconMask, pm, NULL);
      pm = GETPIXMAP(bm);
      XtVaSetValues(X->frame, XtNiconPixmap, pm, (Pixmap)NULL, NULL);
      
      frame_icon = bm;
      frame_mask = mask;
    }
  }
}

Here is the call graph for this function:

void wxPanel::SetItemCursor ( int  x,
int  y 
) [inherited]

Definition at line 224 of file Panel.cc.

{
    cursor_x = x; cursor_y = y;
}
void wxWindow::SetLabel ( char *  label) [virtual, inherited]

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 wxPanel::SetLabelPosition ( int  position) [inline, inherited]

Definition at line 55 of file Panel.h.

{ label_pos = position; }
void wxFrame::SetMenuBar ( wxMenuBar menubar) [inherited]

Definition at line 663 of file Frame.cc.

{
  /* MATTHEW: Enforce safety */
  if (new_menubar && new_menubar->GetParent())
    return;

  if (menubar)
    menubar->Destroy();     // destroy X internal representation
  if ((menubar = new_menubar)) {
    int ww, hh;
    
    menubar->Create(this);
    menubar->GetSize(&ww, &hh);
    yoff = hh; // offset off client area inside frame
  }
}

Here is the call graph for this function:

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

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, inherited]

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, inherited]

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, inherited]

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, inherited]

Definition at line 736 of file Window.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void wxWindow::SetShown ( Bool  shown) [inherited]

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:

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

Reimplemented from wxWindow.

Definition at line 55 of file Frame.h.

              { Configure(-1, -1, width, height, 0); }

Here is the call graph for this function:

Here is the caller graph for this function:

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

Reimplemented from wxWindow.

Definition at line 57 of file Frame.h.

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

Here is the call graph for this function:

void wxFrame::SetStatusText ( char *  text,
int  number = 0 
) [inherited]

Definition at line 608 of file Frame.cc.

{
    if (number < num_status)
       status[number]->SetLabel(text ? text : (char *)"");
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxFrame::SetTitle ( char *  title) [virtual, inherited]

Reimplemented from wxWindow.

Definition at line 809 of file Frame.cc.

{
  if (show_as_mod && title) {
    int len;
    char *s;
    len = strlen(title);
    s = new WXGC_ATOMIC char[len + 2];
    memcpy(s, title, len);
    s[len] = '*';
    s[len+1] = 0;
    title = s;
  }
  wxWindow::SetTitle(title);
}

Here is the caller graph for this function:

virtual void wxWindow::SetUserEditMode ( Bool  edit) [inline, virtual, inherited]

Definition at line 149 of file Window.h.

{ user_edit_mode = edit; }
void wxPanel::SetVerticalSpacing ( int  sp) [inline, inherited]

Definition at line 64 of file Panel.h.

{ v_space = sp; }
Bool wxDialogBox::Show ( Bool  show) [virtual]

Reimplemented from wxFrame.

Definition at line 70 of file DialogBox.cc.

{
  // handle modality
  if (show) {
    wxChildNode *cnode;
    wxChildList *tlf;

    // popup/popdown frame
    wxFrame::Show(show);
    SetShown(show);
      
    if (!restore_disabled_windows) {
      wxList *disabled_windows;

      wxPushModalWindow(this, this);
      
      disabled_windows = new wxList;
      
      tlf = wxTopLevelFrames(this);
      for (cnode = tlf->First(); cnode; cnode = cnode->Next()) {
       wxWindow *w;
       w = (wxWindow *)cnode->Data();
       if (w && w != this && cnode->IsShown()) {
         disabled_windows->Append(w);
         w->InternalEnable(FALSE);
       }
      }
      
      restore_disabled_windows = disabled_windows;
    }

    wxDispatchEventsUntil(CheckDialogShowing, (void *)this);
  } else {
    if (restore_disabled_windows) {
      wxList *disabled_windows = restore_disabled_windows;
      wxNode *node;

      restore_disabled_windows = NULL;
      
      for (node = disabled_windows->First(); node; node = node->Next()) {
       wxWindow *w;
       w = (wxWindow *)node->Data();
       w->InternalEnable(TRUE);
      }

      wxPopModalWindow(this, this);

      wxFrame::Show(FALSE);
      SetShown(FALSE);
      
      XFlush(XtDisplay(wxAPP_TOPLEVEL));
      XSync(XtDisplay(wxAPP_TOPLEVEL), FALSE);
    }
  } 
  
  return TRUE;
}

Here is the call graph for this function:

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

Definition at line 116 of file Window.h.

{};
Bool wxFrame::StatusLineExists ( void  ) [inherited]

Definition at line 614 of file Frame.cc.

{
    return (num_status != 0);
}

Here is the caller graph for this function:

void wxPanel::Tab ( int  pixels = 0) [inherited]

Definition at line 256 of file Panel.cc.

{
    cursor_x += ( pixels ? pixels : h_space);
}
Bool wxPanel::WantsFocus ( void  ) [virtual, inherited]

Reimplemented from wxWindow.

Definition at line 276 of file Panel.cc.

{
  return FALSE;
}

Friends And Related Function Documentation

friend class wxButton [friend, inherited]

Definition at line 76 of file Panel.h.

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

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, inherited]

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.

Bool wxWindow::allow_dclicks [protected, inherited]

Definition at line 221 of file Window.h.

Bool wxWindow::captured [protected, inherited]

Definition at line 222 of file Window.h.

wxChildList* wxWindow::children [protected, inherited]

Definition at line 212 of file Window.h.

wxColourMap* wxWindow::cmap [protected, inherited]

Definition at line 214 of file Window.h.

wxLayoutConstraints* wxWindow::constraints [protected, inherited]

Definition at line 218 of file Window.h.

void* wxFrame::context [inherited]

Definition at line 93 of file Frame.h.

unsigned long wxWindow::current_state [protected, inherited]

Definition at line 234 of file Window.h.

wxCursor* wxWindow::cursor [protected, inherited]

Definition at line 215 of file Window.h.

int wxPanel::cursor_x [protected, inherited]

Definition at line 80 of file Panel.h.

int wxPanel::cursor_y [protected, inherited]

Definition at line 80 of file Panel.h.

wxWindowDC* wxWindow::dc [protected, inherited]

Definition at line 209 of file Window.h.

wxButton* wxPanel::default_item [protected, inherited]

Definition at line 78 of file Panel.h.

wxWindow* wxWindow::dndTarget [protected, inherited]

Definition at line 230 of file Window.h.

Bool wxWindow::drag_accept [protected, inherited]

Definition at line 223 of file Window.h.

wxFont* wxWindow::font [protected, inherited]

Definition at line 216 of file Window.h.

wxBitmap* wxFrame::frame_icon [protected, inherited]

Definition at line 99 of file Frame.h.

wxBitmap* wxFrame::frame_mask [protected, inherited]

Definition at line 100 of file Frame.h.

int wxPanel::h_space [protected, inherited]

Definition at line 80 of file Panel.h.

long wxWindow::hs_page [protected, inherited]

Definition at line 240 of file Window.h.

long wxWindow::hs_pos [protected, inherited]

Definition at line 240 of file Window.h.

long wxWindow::hs_width [protected, inherited]

Definition at line 240 of file Window.h.

short wxWindow::internal_disabled [protected, inherited]

Definition at line 236 of file Window.h.

short wxWindow::internal_gray_disabled [protected, inherited]

Definition at line 237 of file Window.h.

int wxPanel::label_pos [protected, inherited]

Definition at line 79 of file Panel.h.

long wxFrame::last_shown_time [protected, inherited]

Definition at line 102 of file Frame.h.

wxMenuBar* wxFrame::menubar [protected, inherited]

Definition at line 96 of file Frame.h.

long wxWindow::misc_flags [protected, inherited]

Definition at line 232 of file Window.h.

int wxFrame::num_status [protected, inherited]

Definition at line 98 of file Frame.h.

Bool wxWindow::painting_enabled [protected, inherited]

Definition at line 224 of file Window.h.

wxWindow* wxWindow::parent [protected, inherited]

Definition at line 211 of file Window.h.

Definition at line 49 of file DialogBox.h.

wxWindow** wxWindow::saferef [protected, inherited]

Definition at line 228 of file Window.h.

Bool wxFrame::show_as_mod [protected, inherited]

Definition at line 101 of file Frame.h.

wxMessage** wxFrame::status [protected, inherited]

Definition at line 97 of file Frame.h.

long wxWindow::style [protected, inherited]

Definition at line 226 of file Window.h.

Bool wxWindow::user_edit_mode [protected, inherited]

Definition at line 225 of file Window.h.

int wxPanel::v_line_extent [protected, inherited]

Definition at line 80 of file Panel.h.

int wxPanel::v_space [protected, inherited]

Definition at line 80 of file Panel.h.

long wxWindow::vs_page [protected, inherited]

Definition at line 240 of file Window.h.

long wxWindow::vs_pos [protected, inherited]

Definition at line 240 of file Window.h.

long wxWindow::vs_width [protected, inherited]

Definition at line 240 of file Window.h.

wxWindow_Xintern* wxWindow::X [protected, inherited]

Definition at line 207 of file Window.h.

int wxWindow::xoff [protected, inherited]

Definition at line 219 of file Window.h.

int wxWindow::yoff [protected, inherited]

Definition at line 219 of file Window.h.


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