Abdelrazak Younes <[EMAIL PROTECTED]> writes:
> So, if I may ask (again), do we have a deal?

>From me, yes. But I'd like to see a class hierarchy together with some thoughts
on how it will all fit together.

Let me start you off:

class GUI {
   /** The LyX core will own a single GUI
    *  variable, instantiated by a Factory function
    *  in the various frontends.
    *  (Should this class be a singleton then?)
    *
    *  The class owns accessors to
    *    a single Clipboard (Clipboard),
    *    a single Selection buffer (Selection),
    *    (possibly multiple) LyX windows (LyXView),
    *    (possibly multiple) WorkAreas (WorkArea)
    *    (possibly multiple) GUICursors (one per WorkArea)
    *    only one of which can be "active".
    *
    *  (Should the GUICursor be owned by the WorkArea then?)
    */

public:
    /// Singleton class; control access to the one allowed instance.
    static GUI* get();
private:
    GUI();
    GUI(GUI const &);
    ~GUI();
    GUI & operator=(GUI const &);
};

class Clipboard {
   /** The cut-and-paste buffer. One per app.
    *  Filled by highlighting followed by something like Cntl-C
    *  Contents accessed by something like Cntl-V
    *  Allows for inter-application cut and paste with negotiation
    *  over the best transfer format.
    */
};

class Selection {
   /** The X11 selection buffer. One per app.
    *  Filled by highlighting some text.
    *  Contents accessed through middle mouse button.
    */
};

class LyXView {
   /** A variable of this class represents a single
    *  LyX window. The class owns accessors to
    *    Menubars
    *    Toolbars
    *    The minibuffer
    *    one or more WorkAreas
    *    The Dialogs (ie, each Window has its own Dialogs)
    */
};

class GUICursor {
   /** The visible representation of the cursor in a document.
    *  Changes appearance when a WorkArea becomes "active".
    */
};

class WorkArea {
   /** A variable of this class is used to display a single BufferView.
    */
};

If you flesh out how the LyX core will interact with these classes (add the
functions and explain how they're to be used), I'm sure that you'll quickly find
what areas need some deeper thought.

Angus

Reply via email to