home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / i / iv26_w_3.zip / EXAMPLES / ICLASS / ICLASS.H < prev    next >
C/C++ Source or Header  |  1980-01-05  |  3KB  |  103 lines

  1. /*
  2.  * Copyright (c) 1989 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, distribute, and sell this software and its
  5.  * documentation for any purpose is hereby granted without fee, provided
  6.  * that the above copyright notice appear in all copies and that both that
  7.  * copyright notice and this permission notice appear in supporting
  8.  * documentation, and that the name of Stanford not be used in advertising or
  9.  * publicity pertaining to distribution of the software without specific,
  10.  * written prior permission.  Stanford makes no representations about
  11.  * the suitability of this software for any purpose.  It is provided "as is"
  12.  * without express or implied warranty.
  13.  *
  14.  * STANFORD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  15.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  17.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  18.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  19.  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
  20.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  21.  */
  22.  
  23. /*
  24.  * IClass - interface to choosing classes.
  25.  */
  26.  
  27. #ifndef iclass_h
  28. #define iclass_h
  29.  
  30. #include <InterViews/scene.h>
  31.  
  32. class ClassBuffer;
  33.  
  34. class IClass : public MonoScene {
  35. public:
  36.     IClass(ClassBuffer*);
  37.     virtual ~IClass();
  38.  
  39.     void Run();
  40.     boolean Command(char);
  41.  
  42.     void ScanCmd();
  43.     void QuitCmd();
  44.     void ForwardSearchCmd();
  45.     void BackwardSearchCmd();
  46.     void GotoCmd();
  47.  
  48.     virtual void Handle(Event&);
  49. protected:
  50.     virtual void Update();
  51. private:
  52.     void Init(ClassBuffer*);
  53.  
  54.     Interactor* Commands();
  55.     Interactor* Classes();
  56.     Interactor* SelectedClass();
  57.     Interactor* Parents();
  58.     Interactor* Children();
  59.     Interactor* Editor();
  60.     Interactor* Interior();
  61.     Interactor* AddScroller(Interactor*);
  62.  
  63.     void InsertDialog(Interactor*);
  64.     void RemoveDialog(Interactor*);
  65.  
  66.     void Visit(const char*);
  67.     void Complain(const char* = nil);
  68.     boolean ForwardSearch(const char*);
  69.     boolean BackwardSearch(const char*);
  70.  
  71.     void UpdateClassesBrowser();
  72.     void UpdateParentBrowser();
  73.     void UpdateChildBrowser();
  74.     void UpdateCurClass();
  75.     void UpdateCurClass(const char*);
  76.     void UpdateEditor();
  77.     void UnselectBrowsers();
  78.  
  79.     void SelectCurClass();
  80.     void UnselectCurClass();
  81. private:
  82.     class ButtonState* _state;
  83.     ClassBuffer* _cbuf;
  84.     class StringEditor* _curClass;
  85.     Interactor* _focus;
  86.     class StringBrowser* _classes;
  87.     StringBrowser* _children;
  88.     StringBrowser* _parents;
  89.     class MarginFrame* _fileIndic;
  90.     class FileDialog* _scanner;
  91.     class StringDialog* _fwdSearch;
  92.     class StringDialog* _bwdSearch;
  93.     class StringDialog* _goto;
  94.  
  95.     class TextBuffer* _text;
  96.     class ClassEditor* _editor;
  97.     char* _lastFile;
  98.     char* _buf;
  99.     int _bufsize;
  100. };
  101.  
  102. #endif
  103.