commit: better cmdline code

From: Patrick Lam (plam@plam.lcs.mit.edu)
Date: Sun May 12 2002 - 02:08:45 EDT

  • Next message: Patrick Lam: "commit: popt for cocoa"

    Improved OOness of cmdline code. Will port to Cocoa momentarily.
    CVS: ----------------------------------------------------------------------
    CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
    CVS:
    CVS: Committing in .
    CVS:
    CVS: Modified Files:
    CVS: src/wp/ap/unix/ap_UnixApp.cpp src/wp/ap/unix/ap_UnixApp.h
    CVS: src/wp/ap/unix/gnome/ap_UnixGnomeApp.cpp
    CVS: src/wp/ap/xp/ap_App.cpp src/wp/ap/xp/ap_App.h
    CVS: ----------------------------------------------------------------------

    I think that this should work; the main logic is now in ap_App instead
    of platform-specific code, with callbacks as appropriate.

    This will probably break the Windows build. You need to implement the
    following virtual functions:

            /* Print an error message. eg printf on UNIX, MessageBox on Windows. */
            virtual void errorMsgBadArg (AP_Args *, int);
            virtual void errorMsgBadFile(XAP_Frame *, const char *, UT_Error);

            /* Allow additional platform-specific windowless args. */
            virtual bool doWindowlessArgs (const AP_Args *);

            /* Create a new XAP_Frame object. */
            virtual XAP_Frame * newFrame(AP_App *);

    doWindowlessArgs can probably be left empty; newFrame needs to create a new
    XAP_Win32Frame, and is now called by AP_App::parseCommandLine. There is no
    more parseCommandLine in platform code.

    pat



    This archive was generated by hypermail 2.1.4 : Sun May 12 2002 - 02:12:13 EDT