Back to index

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

List of all members.

Public Member Functions

 MrEdApp ()
wxFrameOnInit (void)
void RealInit (void)
int OnExit (void)
virtual void Dispatch (void)
Bool Initialized (void)
virtual int MainLoop (void)
virtual void ExitMainLoop (void)
virtual Bool Pending (void)
char * GetAppName (void)
void SetAppName (char *name)
char * GetClassName (void)
void SetClassName (char *name)
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

Bool initialized
int xargc
char ** xargv
int argc
char ** argv
Bool keep_going
WXTYPE __type
void__gc_external

Detailed Description

Definition at line 207 of file mred.cxx.


Constructor & Destructor Documentation

Definition at line 2884 of file mred.cxx.

{
#ifndef wx_xt
  if (!wx_class)
    wx_class = "mred";
#endif
}

Member Function Documentation

void wxApp::Dispatch ( void  ) [virtual, inherited]

Definition at line 73 of file AppMain.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void wxApp::ExitMainLoop ( void  ) [inline, virtual, inherited]

Definition at line 44 of file AppMain.h.

char* wxApp::GetAppName ( void  ) [inline, inherited]

Definition at line 49 of file AppMain.h.

{ return wxAPP_NAME; }
char* wxApp::GetClassName ( void  ) [inline, inherited]

Definition at line 51 of file AppMain.h.

{ return wxAPP_CLASS; }
Bool wxApp::Initialized ( void  ) [inline, inherited]

Definition at line 42 of file AppMain.h.

{ return initialized; };

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:

int wxApp::MainLoop ( void  ) [virtual, inherited]

Definition at line 78 of file AppMain.cc.

{
    keep_going = TRUE;
    while (keep_going) {
      wxDoEvents();
    }
    return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int MrEdApp::OnExit ( void  ) [virtual]

Reimplemented from wxApp.

Definition at line 3318 of file mred.cxx.

{
  return 0;
}
wxFrame * MrEdApp::OnInit ( void  ) [virtual]

Reimplemented from wxApp.

Definition at line 3038 of file mred.cxx.

{
  MrEdContext *mmc;

  initialized = 0;

#ifdef wx_mac
  {
    TSMDocumentID doc;
    OSType itfs[1];
    itfs[0] = kUnicodeDocumentInterfaceType;
    NewTSMDocument(1, itfs, &doc, 0);
    UseInputWindow(NULL, TRUE);
    ActivateTSMDocument(doc);
  }
#endif

  wxREGGLOB(mred_frames);
  wxREGGLOB(timer_contexts);
  timer_contexts = scheme_make_hash_table(SCHEME_hash_ptr);

#ifdef LIBGPP_REGEX_HACK
  new WXGC_PTRS Regex("a", 0);
#endif

#if REDIRECT_STDIO || WCONSOLE_STDIO
  if (!wx_in_terminal) {
    scheme_make_stdin = CAST_MK MrEdMakeStdIn;
    scheme_make_stdout = CAST_MK MrEdMakeStdOut;
    scheme_make_stderr = CAST_MK MrEdMakeStdErr;
  }
#endif

#if !defined(USE_SENORA_GC) && !defined(MZ_PRECISE_GC)
  GC_set_warn_proc(CAST_IGNORE MrEdIgnoreWarnings);
#endif
  scheme_set_report_out_of_memory(MrEdOutOfMemory);

#ifdef SGC_STD_DEBUGGING
  scheme_external_dump_info = dump_cpp_info;
# ifdef USE_WXOBJECT_TRACE_COUNTER
  scheme_external_dump_type = object_type_name;
  scheme_external_dump_arg = set_trace_arg;
# endif
#endif

#if REDIRECT_STDIO || WCONSOLE_STDIO
  scheme_console_printf = CAST_PRINTF MrEdSchemeMessages;
  if (!wx_in_terminal) {
    scheme_console_output = CAST_OUTPUT MrEdSchemeMessagesOutput;
  }
#endif

  mred_eventspace_param = scheme_new_param();
  mred_event_dispatch_param = scheme_new_param();
  mred_ps_setup_param = scheme_new_param();

  mred_eventspace_type = scheme_make_type("<eventspace>");
  mred_nested_wait_type = scheme_make_type("<eventspace-nested-wait>");
  mred_eventspace_hop_type = scheme_make_type("<internal:eventspace-hop>");
#ifdef MZ_PRECISE_GC
  GC_register_traversers(mred_eventspace_type,
                      size_eventspace_val,
                      mark_eventspace_val,
                      fixup_eventspace_val,
                      1, 0);
  GC_register_traversers(mred_nested_wait_type,
                      size_nested_wait_val,
                      mark_nested_wait_val,
                      fixup_nested_wait_val,
                      1, 0);
  GC_register_traversers(mred_eventspace_hop_type,
                      size_eventspace_hop_val,
                      mark_eventspace_hop_val,
                      fixup_eventspace_hop_val,
                      1, 0);
#endif

#ifdef NEED_HET_PARAM
  wxREGGLOB(mred_het_key);
  mred_het_key = scheme_make_symbol("het"); /* uninterned */
#endif

#ifdef MZ_PRECISE_GC
  mmc = (MrEdContext *)GC_malloc_one_tagged(sizeof(MrEdContext));
#else
  mmc = new WXGC_PTRS MrEdContext;
#endif
  mmc->so.type = mred_eventspace_type;
  wxREGGLOB(mred_main_context);
  mred_main_context = mmc;
  {
    wxChildList *cl;
    cl = new WXGC_PTRS wxChildList();
    mmc->topLevelWindowList = cl;
  }
  {
    MrEdFinalizedContext *fc;
    fc = new WXGC_PTRS MrEdFinalizedContext;
    mmc->finalized = fc;
  }

  wxREGGLOB(mred_only_context);
  mred_only_context = mred_main_context;

  MrEdInitFirstContext(mred_main_context);

  /* Just in case wxWindows needs an initial frame: */
  /* (Windows needs it for the clipboard.) */
  wxREGGLOB(mred_real_main_frame);
  mred_real_main_frame = new WXGC_PTRS wxFrame(NULL, "MrEd");
#ifdef wx_msw
  TheMrEdApp->wx_frame = mred_real_main_frame;
#endif

  wxInitClipboard();

  wxscheme_early_gl_init();

#ifdef mred_BREAK_HANDLER
# ifdef OS_X
  _signal_nobind(SIGINT, user_break_hit);
# else
  MZ_SIGSET(SIGINT, user_break_hit);
# endif
#endif

#ifdef wx_mac
# ifdef OS_X
  /* Hack to make sure it's referenced, so that xform doesn't throw it away. */
  wx_in_terminal = wx_in_terminal;
# endif
#endif

  mred_run_from_cmd_line(argc, argv, setup_basic_env);

#if WCONSOLE_STDIO
  if (!wx_in_terminal) {
    /* The only reason we get here is that a command-line error or
       -h occured. In either case, stick around for the sake of the
       console. */
    MrEdExit(1);
  }
#endif

  return NULL;
}

Here is the call 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;}
Bool wxApp::Pending ( void  ) [virtual, inherited]

Definition at line 87 of file AppMain.cc.

{
    XFlush(wxAPP_DISPLAY);
    return (wxEventReady());
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 3200 of file mred.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void wxApp::SetAppName ( char *  name) [inline, inherited]

Definition at line 50 of file AppMain.h.

void wxApp::SetClassName ( char *  name) [inline, inherited]

Definition at line 52 of file AppMain.h.


Member Data Documentation

Definition at line 146 of file wxGC.h.

WXTYPE wxObject::__type [inherited]

Definition at line 77 of file Object.h.

int wxApp::argc [inherited]

Definition at line 54 of file AppMain.h.

char** wxApp::argv [inherited]

Definition at line 55 of file AppMain.h.

Reimplemented from wxApp.

Definition at line 210 of file mred.cxx.

Bool wxApp::keep_going [inherited]

Definition at line 61 of file AppMain.h.

Definition at line 211 of file mred.cxx.

Definition at line 212 of file mred.cxx.


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