DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T i

⟦60f110f18⟧ TextFile

    Length: 5855 (0x16df)
    Types: TextFile
    Names: »ibdialogs.h«

Derivation

└─⟦8648bda34⟧ Bits:30007244 EUUGD5_II: X11R5
    └─⟦87c3ac0e0⟧ »./contrib-3/contrib-3.00« 
        └─⟦de8ce1454⟧ 
            └─⟦this⟧ »contrib/lib/iv/src/bin/ibuild/ibdialogs.h« 

TextFile

/*
 * Copyright (c) 1991 Stanford University
 *
 * Permission to use, copy, modify, distribute, and sell this software and its
 * documentation for any purpose is hereby granted without fee, provided
 * that the above copyright notice appear in all copies and that both that
 * copyright notice and this permission notice appear in supporting
 * documentation, and that the name of Stanford not be used in advertising or
 * publicity pertaining to distribution of the software without specific,
 * written prior permission.  Stanford makes no representations about
 * the suitability of this software for any purpose.  It is provided "as is"
 * without express or implied warranty.
 *
 * STANFORD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
 * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

/*
 * User interface builder-specific dialog boxes.
 * $Header: /master/3.0/iv/src/bin/ibuild/RCS/ibdialogs.h,v 1.2 91/09/27 14:13:40 tang Exp $
 */

#ifndef ibdialogs_h
#define ibdialogs_h

#include <Unidraw/dialogs.h>
#include <Unidraw/uarray.h>
#include <InterViews/filechooser.h>

class ButtonStateVarView;
class ButtonSharedName;
class CtrlStateVarView;
class Deck;
class EditorInfo;
class InteractorComp;
class InstanceNameVarView;
class Iterator;
class IBVarView;
class Props;
class PropsEditor;
class UList;
class VBox;

class InfoDialog : public BasicDialog {
public:
    InfoDialog(const char* = "Interactor Information");
    virtual ~InfoDialog();

    virtual boolean Accept();
    virtual void Handle(Event&);

    void First(Iterator&);
    void Next(Iterator&);
    boolean Done(Iterator);
    IBVarView* GetStateView(Iterator);

    void Include(IBVarView*);
    ButtonState* GetState();
    boolean AppliedChanges(const char*& errors);
    UList* GetAffectedStates();
private:
    Interactor* Interior();
    Interactor* Buttons(int);
private:
    VBox* _body;
    UList* _bodylist;
};

class PropsDialog : public BasicDialog {
public:
    PropsDialog(InteractorComp* icomp);

    virtual boolean Accept();
    virtual void Handle(Event&);
    boolean AppliedChanges(const char*& errors);
private:
    Interactor* Interior();
    Interactor* Buttons(int);
private:
    InstanceNameVarView* _instanceView;
    Props* _props;
    PropsEditor* _propsEd;
};

class BSDialog : public BasicDialog {
public:
    BSDialog(ButtonStateVarView*);
    virtual boolean Accept();
    virtual void Handle(Event&);
    boolean ChangeBS();
    boolean Init();
protected:
    Interactor* Interior();
    Interactor* Buttons(int);
    boolean NameNotChanged();
protected:
    ButtonStateVarView* _bsvarview;
    MatchEditor* _bs, *_funcname, *_initial;
    ButtonState* _exporter;
};

class CtrlDialog : public BSDialog {
public:
    CtrlDialog(CtrlStateVarView*);
private:
    Interactor* Interior();
};

class OptionDialog : public BasicDialog {
public:
    OptionDialog(
        const char*, const char*,
        int, const char*, int, const char*, int, const char*
    );
    virtual boolean Accept();
    int Option();
private:
    Interactor* Interior(int, const char*, int, const char*, int, const char*);
private:
    ButtonState* _select;
};

class ConflictDialog : public BasicDialog {
public:
    ConflictDialog(void*);
    virtual ~ConflictDialog();

    void AddConflict(const char* = "", boolean checked = true);

    virtual boolean Accept();
    virtual void Update();

    boolean Checked(const char*);
    boolean Skipped();
    int GetHashId();
    void* GetId();
    
private:
    Interactor* Interior();
    void AddCheckBox(Scene*, int);

    char* conflict(int);
    ButtonState* bs(int);
    void conflict(char*, int);
    void bs(ButtonState*, int);
private:
    void* _id;
    UArray _conflict;
    UArray _bs;
    int _hash_id;
};

inline void* ConflictDialog::GetId () { return _id; }
inline char* ConflictDialog::conflict (int i) { return (char*) _conflict[i]; }
inline ButtonState* ConflictDialog::bs (int i) { return (ButtonState*)_bs[i]; }
inline int ConflictDialog::GetHashId () { return _hash_id; }

class ExeDialog : public FileChooser {
public:
    ExeDialog(const char* dir = "~");
    virtual void Update();
private:
    Interactor* Interior();
};

class InstallRemoveDialog : public BasicDialog {
public:
    InstallRemoveDialog(EditorInfo* orig, int rows = 10, int cols = 24);
    virtual ~InstallRemoveDialog();

    EditorInfo* Installed();
    EditorInfo* Removed();

    virtual boolean Accept();
    virtual void Handle(Event&);
    virtual void Update();
private:
    void Init(EditorInfo*, int, int);
    void InstallSelections();
    void RemoveSelections();

    Interactor* Interior();
    Interactor* AddScroller(Interactor*);
    int Position(StringBrowser*, const char*);
private:
    StringBrowser* _current;
    class FileBrowser* _available;

    ButtonState* _install;
    ButtonState* _remove;
    ButtonState* _clear;

    EditorInfo* _originals;
    EditorInfo* _installed, *_removed;
};

inline EditorInfo* InstallRemoveDialog::Installed () { return _installed; }
inline EditorInfo* InstallRemoveDialog::Removed () { return _removed; }

class AbortDialog : public AcknowledgeDialog {
public:
    AbortDialog(int pid, const char* title);
    boolean Abort();
private:
    Interactor* Interior(const char* title);
private:
    int _pid;
};

class StringBrowserDialog : public AcknowledgeDialog {
public:
    StringBrowserDialog(const char* text);
    virtual ~StringBrowserDialog();
private:
    Interactor* Interior();
    char* _text;
};

#endif