Back to index

plt-scheme  4.2.1
Defines | Functions | Variables
BusyCursor.cc File Reference
#include "wx.h"
#include "widgets.h"

Go to the source code of this file.

Defines

#define Uses_XLib
#define Uses_XtIntrinsic
#define Uses_wxCursor
#define Uses_wxWindow
#define Uses_wxTypeTree
#define Uses_SimpleWidget

Functions

int wxGetBusyState ()
void wxSetBusyState (int)
void wxXSetNoCursor (wxWindow *win, wxCursor *cursor)
void wxXSetBusyCursor (wxWindow *win, wxCursor *cursor)
static void set_all_cursors (wxObject *o, wxCursor *cursor)
void wxBeginBusyCursor (wxCursor *cursor)
void wxEndBusyCursor (void)
Bool wxIsBusy (void)
void wxHideCursor (void)
void wxUnhideCursor (void)
int wxCheckHiddenCursors ()
int wxUnhideCursorInFrame (wxObject *o, int busy)

Variables

static int some_hidden = 0

Define Documentation

Definition at line 33 of file BusyCursor.cc.

#define Uses_wxCursor

Definition at line 29 of file BusyCursor.cc.

#define Uses_wxTypeTree

Definition at line 31 of file BusyCursor.cc.

#define Uses_wxWindow

Definition at line 30 of file BusyCursor.cc.

#define Uses_XLib

Definition at line 27 of file BusyCursor.cc.

Definition at line 28 of file BusyCursor.cc.


Function Documentation

static void set_all_cursors ( wxObject o,
wxCursor cursor 
) [static]

Definition at line 105 of file BusyCursor.cc.

{
  wxChildList *cl;
  wxWindow *win;
  wxChildNode *node;

  cl = wxTopLevelFrames(o);
  for (node = cl->First(); node; node = node->Next()) {
    win = (wxWindow *)node->Data();
    if (win)
      wxXSetBusyCursor(win, cursor);
  }

  XFlush(wxAPP_DISPLAY);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 128 of file BusyCursor.cc.

{
  int busy;

  busy = wxGetBusyState();
  if (busy >= 0) {
    busy++;
    wxSetBusyState(busy);
  } else {
    /* Blanked, so "increment", but don't change cursor */
    --busy;
    wxSetBusyState(busy);
    return;
  }

  if (busy == 1) {
    set_all_cursors(NULL, cursor);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 211 of file BusyCursor.cc.

{
  if (some_hidden) {
    some_hidden = 0;
    return 1;
  }
  return 0;
}

Definition at line 150 of file BusyCursor.cc.

{
  int busy;

  busy = wxGetBusyState();
  if ((busy == 0) || (busy == -1))
    return;
  if (busy > 0) {
    busy--;
    wxSetBusyState(busy);
  } else {
    /* Blanked, so "decrement", but don't change cursor */
    busy++;
    wxSetBusyState(busy);
    return;
  }

  if (busy == 0) {
    set_all_cursors(NULL, NULL);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 520 of file mred.cxx.

{
  MrEdContext *c;
  c = MrEdGetContext();

  return c->busyState;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 182 of file BusyCursor.cc.

{
  int busy;
  busy = wxGetBusyState();

  if (busy >= 0) {
    some_hidden++;
    busy = -(busy + 1);
    wxSetBusyState(busy);
    set_all_cursors(NULL, wxBLANK_CURSOR);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 172 of file BusyCursor.cc.

{
  int busy;
  busy = wxGetBusyState();
  return ((busy > 0) || (busy < -1));
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 528 of file mred.cxx.

{
  MrEdContext *c;
  c = MrEdGetContext();

  c->busyState = state;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 196 of file BusyCursor.cc.

{
  int busy;
  busy = wxGetBusyState();

  if (busy < 0) {
    if (some_hidden)
      --some_hidden;
    busy = -(busy + 1);
    wxSetBusyState(busy);
    set_all_cursors(NULL, (busy > 0) ? wxHOURGLASS_CURSOR : NULL);
  }  
}

Here is the call graph for this function:

Here is the caller graph for this function:

int wxUnhideCursorInFrame ( wxObject o,
int  busy 
)

Definition at line 222 of file BusyCursor.cc.

{
  if (busy < 0) {
    busy = -(busy + 1);
    set_all_cursors(o, (busy > 0) ? wxHOURGLASS_CURSOR : NULL);
  }
  return busy;
}

Here is the call graph for this function:

void wxXSetBusyCursor ( wxWindow win,
wxCursor cursor 
)

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);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxXSetNoCursor ( wxWindow win,
wxCursor cursor 
)

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);
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

int some_hidden = 0 [static]

Definition at line 179 of file BusyCursor.cc.