"Fossies" - the Fresh Open Source Software Archive

Member "ivtools-ivtools-2.0.4/src/ComGlyph/attrdialog.h" (9 Oct 2020, 2814 Bytes) of package /linux/misc/ivtools-ivtools-2.0.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "attrdialog.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (c) 1995-1997 Vectaport Inc.
    3  *
    4  * Permission to use, copy, modify, distribute, and sell this software and
    5  * its 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 names of the copyright holders not be used in
    9  * advertising or publicity pertaining to distribution of the software
   10  * without specific, written prior permission.  The copyright holders make
   11  * no representations about the suitability of this software for any purpose.
   12  * It is provided "as is" without express or implied warranty.
   13  *
   14  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
   15  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
   16  * IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL,
   17  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
   18  * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
   19  * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
   20  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   21  * 
   22  */
   23 
   24 #ifndef attrdialog_h
   25 #define attrdialog_h
   26 
   27 #include <ComGlyph/terpdialog.h>
   28 #include <ComTerp/comterp.h>
   29 #include <ComTerp/comfunc.h>
   30 
   31 
   32 class Action;
   33 class AttrDialogImpl;
   34 class NextAttrDialogFunc;
   35 class TrueAttrDialogFunc;
   36 class FalseAttrDialogFunc;
   37 class DoneAttrDialogFunc;
   38 
   39 class AttrDialog : public TerpDialog {
   40 public:
   41     AttrDialog(boolean session = false, int argc = -1, char** argv = nil,
   42            boolean init = true);
   43     AttrDialog(ComTerpServ* comterp, boolean session = false, int argc = -1, char** argv = nil,
   44            boolean init = true);
   45     virtual ~AttrDialog();
   46 
   47     boolean cancel();
   48 
   49     static AttrDialog& instance();
   50     static void instance(AttrDialog*);
   51 
   52     void next_expr(const char*);
   53     void true_expr(const char*);
   54     void false_expr(const char*);
   55     void done_expr(const char*);
   56 
   57 protected:
   58     void _init(ComTerpServ* comterp, boolean session, int argc, char** argv);
   59     static AttrDialog* instance_;
   60 };
   61 
   62 class AttrDialogImpl : public TerpDialogImpl {
   63 protected:
   64     friend class AttrDialog;
   65     AttrDialogImpl();
   66 
   67     InputHandler* init(TerpDialog*, Style*, boolean session = false, 
   68         int argc = -1, char** argv = nil);
   69 
   70     /* general buttons */
   71     void eval();
   72 
   73     /* script for iter, eval-true, and eval-false */
   74     char* next_expr_;
   75     postfix_token* next_code_;
   76     int next_len_;
   77 
   78     char* true_expr_;
   79     postfix_token* true_code_;
   80     int true_len_;
   81 
   82     char* false_expr_;
   83     postfix_token* false_code_;
   84     int false_len_;
   85 
   86     char* done_expr_;
   87     postfix_token* done_code_;
   88     int done_len_;
   89 
   90 };
   91 
   92 declareActionCallback(AttrDialogImpl)
   93 
   94 #endif
   95 
   96 
   97 
   98