Back to index

plt-scheme  4.2.1
Public Member Functions | Public Attributes
os_wxColourDatabase Class Reference
Inheritance diagram for os_wxColourDatabase:
Inheritance graph
[legend]
Collaboration diagram for os_wxColourDatabase:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ~os_wxColourDatabase ()
wxColourFindColour (const char *colour)
char * FindName (wxColour *colour)
int Number (void)
wxNodeAppend (wxObject *object)
wxNodeAppend (long key, wxObject *object)
wxNodeAppend (const char *key, wxObject *object)
wxNodeAppend (void *key, wxObject *object)
wxNodeInsert (wxObject *object)
wxNodeInsert (wxNode *position, wxObject *object)
Bool DeleteNode (wxNode *node)
Bool DeleteObject (wxObject *object)
void Clear (void)
wxNodeFirst (void)
wxNodeLast (void)
wxNodeNth (int i)
wxNodeFind (long key)
wxNodeFind (const char *key)
wxNodeFindPtr (void *key)
wxNodeMember (wxObject *object)
void DeleteContents (int destroy)
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

int n
int destroy_data
wxNodefirst_node
wxNodelast_node
unsigned int key_type
WXTYPE __type
void__gc_external

Detailed Description

Definition at line 1381 of file wxs_gdi.cxx.


Constructor & Destructor Documentation

Definition at line 1403 of file wxs_gdi.cxx.

Here is the call graph for this function:


Member Function Documentation

wxNode * wxList::Append ( wxObject object) [inherited]

Definition at line 269 of file wb_list.cxx.

{
  wxNode *node;
  node = new WXGC_PTRS wxNode(last_node, NULL, object);
  return DoAppend(node);
}

Here is the call graph for this function:

Here is the caller graph for this function:

wxNode * wxList::Append ( long  key,
wxObject object 
) [inherited]

Definition at line 314 of file wb_list.cxx.

{
  wxNode *node;
  node = new WXGC_PTRS wxNode(last_node, NULL, object, key);
  return DoAppend(node);
}

Here is the call graph for this function:

wxNode * wxList::Append ( const char *  key,
wxObject object 
) [inherited]

Definition at line 321 of file wb_list.cxx.

{
  wxNode *node;
  node = new WXGC_PTRS wxNode(last_node, NULL, object, key);
  return DoAppend(node);
}

Here is the call graph for this function:

wxNode * wxList::Append ( void key,
wxObject object 
) [inherited]

Definition at line 328 of file wb_list.cxx.

{
  wxNode *node;
  node = new WXGC_PTRS wxNode(last_node, NULL, object, key);
  return DoAppend(node);
}

Here is the call graph for this function:

void wxList::Clear ( void  ) [inherited]

Definition at line 344 of file wb_list.cxx.

{
  wxNode *current, *next;

  current = first_node;
  while (current) {
    next = current->Next();
    DELETE_OBJ current;
    current = next;
  }
  first_node = NULL;
  last_node = NULL;
  n = 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void wxList::DeleteContents ( int  destroy) [inline, inherited]

Definition at line 135 of file wx_list.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Bool wxList::DeleteNode ( wxNode node) [inherited]

Definition at line 244 of file wb_list.cxx.

{
  if (node) {
    node->Kill(this);
    DELETE_OBJ node;
    return TRUE;
  }
  return FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Bool wxList::DeleteObject ( wxObject object) [inherited]

Definition at line 254 of file wb_list.cxx.

{
  wxNode * current;
  // Search list for object
  for (current = first_node; current; current = current->Next ()) {
    if (current->Data () == object) {
      current->Kill(this);
      DELETE_OBJ current;
      return TRUE;
    }
  }
  return FALSE;                    // Did not find the object
}

Here is the call graph for this function:

wxNode * wxList::Find ( long  key) [inherited]

Definition at line 188 of file wb_list.cxx.

{
  wxNode *current;
  current = First();
  while (current) {
    if (current->integer_key == key)
      return current;
    current = current->Next();
  }
    
  return NULL;                     // Not found!
}

Here is the call graph for this function:

Here is the caller graph for this function:

wxNode * wxList::Find ( const char *  key) [inherited]

Definition at line 201 of file wb_list.cxx.

{
  wxNode *current;
  current = First();
  while (current) {
    if (!current->string_key) {
      wxFatalError ("wxList: string key not present, probably did not Append correctly!");
      break;
    }
    if (strcmp (current->string_key, key) == 0)
      return current;
    current = current->Next();
  }

  return NULL;                     // Not found!

}

Here is the call graph for this function:

wxColour * wxColourDatabase::FindColour ( const char *  colour) [inherited]

Definition at line 349 of file Colour.cc.

{
  wxNode *node;
  wxColour *col;
#if 0
  XColor xcolor;
  Colormap cm;
#endif

  // Force capital so lc matches as in X
  char uc_colour[256];
  int i;

  for (i = 0; colour[i] && i < 255; i++) {
    uc_colour[i] = colour[i];
    if ((uc_colour[i] >= 'a') && (uc_colour[i] <= 'z'))
      uc_colour[i] -= ('a' - 'A');
  }
  uc_colour[i] = 0;
  colour = uc_colour;

  if ((node = Find(colour)))
    return (wxColour*)node->Data(); // colour already defined

  /* Define the standard set: */
  static wxHashTable *aux = NULL;
  if (!aux) {
    wxColour *tmpc;
    wxREGGLOB(aux);
    aux = new wxHashTable(wxKEY_STRING, 20);
#define APPEND_C(name, c) tmpc = c; tmpc->Lock(1); aux->Put(name, tmpc);
#include "../../../wxcommon/DBColors.inc"
  }

#if 0
  // use wxAPP_DISPLAY and wxAPP_COLOURMAP as default
  cm = GETCOLORMAP(wxAPP_COLOURMAP);
  if (XParseColor(wxAPP_DISPLAY, cm, colour, &xcolor)) {
    // new colour found: add to list as found, but only if it's in the standard set
    col = (wxColour *)aux->Get(colour);
    if (col) {
      col = DEBUG_NEW wxColour((unsigned char)(xcolor.red >> SHIFT),
                            (unsigned char)(xcolor.green >> SHIFT),
                            (unsigned char)(xcolor.blue >> SHIFT));
      col->Lock(1);
    }
  } else 
#endif
    {
      col = (wxColour *)aux->Get(colour);
    }

  if (col)
    Append(colour, col);

  return col;
}

Here is the call graph for this function:

Here is the caller graph for this function:

char * wxColourDatabase::FindName ( wxColour colour) [inherited]

Definition at line 407 of file Colour.cc.

{
  if (colour->Ok()) {
    wxNode *node;
    unsigned char red, green, blue;

    red   = colour->Red();
    green = colour->Green();
    blue  = colour->Blue();
    
    for (node = First(); node; node = node->Next()) {
      wxColour *col;
      col = (wxColour*)node->Data ();
      if (col->Red()==red && col->Green()==green && col->Blue()==blue) {
       char *found = node->string_key;
       if (found)
         return found;
      }
    }
  }
  return NULL;
}

Here is the call graph for this function:

wxNode * wxList::FindPtr ( void key) [inherited]

Definition at line 219 of file wb_list.cxx.

{
  wxNode *current;
  current = First();
  while (current) {
    if ((void *)current->string_key == key)
      return current;
    current = current->Next();
  }
  
  return NULL;                     // Not found!
}

Here is the call graph for this function:

wxNode* wxList::First ( void  ) [inline, inherited]

Definition at line 124 of file wx_list.h.

{ return first_node; }

Here is the caller graph for this function:

wxNode * wxList::Insert ( wxObject object) [inherited]

Definition at line 277 of file wb_list.cxx.

{
  wxNode *node;

  node = First();
  node = new WXGC_PTRS wxNode(NULL, node, object);
  first_node = node;

  if (!(node->Next()))
    last_node = node;

  n++;
  return node;
}

Here is the call graph for this function:

wxNode * wxList::Insert ( wxNode position,
wxObject object 
) [inherited]

Definition at line 294 of file wb_list.cxx.

{
  wxNode *prev = NULL;
  wxNode *node;
  if (position)
    prev = position->Previous ();

  node = new WXGC_PTRS wxNode(prev, position, object);
  if (!first_node) {
      first_node = node;
      last_node = node;
  }
  if (!prev)
    first_node = node;

  n++;
  return node;
}

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:

wxNode* wxList::Last ( void  ) [inline, inherited]

Definition at line 125 of file wx_list.h.

{ return last_node; }
wxNode * wxList::Member ( wxObject object) [inherited]

Definition at line 232 of file wb_list.cxx.

{
  wxNode * current;
  for (current = First (); current; current = current->Next ()) {
    wxObject *each;
    each = current->Data ();
    if (each == object)
      return current;
  }
  return NULL;
}

Here is the call graph for this function:

wxNode * wxList::Nth ( int  i) [inherited]

Definition at line 176 of file wb_list.cxx.

{
  int j = 0;
  wxNode * current;
  for (current = First (); current; current = current->Next ()) {
    if (j++ == i)
      return current;
  }
  return NULL;                     // No such element

}

Here is the call graph for this function:

int wxList::Number ( void  ) [inline, inherited]

Definition at line 97 of file wx_list.h.

{ return n; }

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

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 83 of file wx_list.h.

wxNode* wxList::first_node [inherited]

Definition at line 84 of file wx_list.h.

unsigned int wxList::key_type [inherited]

Definition at line 86 of file wx_list.h.

wxNode* wxList::last_node [inherited]

Definition at line 85 of file wx_list.h.

int wxList::n [inherited]

Definition at line 82 of file wx_list.h.


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