X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=c%2B%2B%2Fcursesf.h;h=abd2a7dcc7dc2ea4667102920d51d2f0d4dcf47f;hp=40f4146172c355084fe274b77aa7ddbdf5c2691b;hb=refs%2Ftags%2Fv5.3;hpb=c633e5103a29a38532cf1925257b91cea33fd090 diff --git a/c++/cursesf.h b/c++/cursesf.h index 40f41461..abd2a7dc 100644 --- a/c++/cursesf.h +++ b/c++/cursesf.h @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. * + * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -28,13 +28,14 @@ ****************************************************************************/ /**************************************************************************** - * Author: Juergen Pfeifer 1997 * + * Author: Juergen Pfeifer, 1997 * + * Contact: http://www.familiepfeifer.de/Contact.aspx?Lang=en * ****************************************************************************/ -// $Id: cursesf.h,v 1.12 2000/07/15 21:08:25 tom Exp $ +// $Id: cursesf.h,v 1.17 2002/07/06 15:47:52 juergen Exp $ -#ifndef _CURSESF_H -#define _CURSESF_H +#ifndef NCURSES_CURSESF_H_incl +#define NCURSES_CURSESF_H_incl 1 #include #include @@ -47,11 +48,11 @@ extern "C" { // The abstract base class for buitin and user defined Fieldtypes. // ------------------------------------------------------------------------- // -class NCursesFormField; // forward declaration +class NCURSES_IMPEXP NCursesFormField; // forward declaration // Class to represent builtin field types as well as C++ written new // fieldtypes (see classes UserDefineFieldType... -class NCursesFieldType { +class NCURSES_IMPEXP NCursesFieldType { friend class NCursesFormField; protected: @@ -80,7 +81,7 @@ public: // The class representing a forms field, wrapping the lowlevel FIELD struct // ------------------------------------------------------------------------- // -class NCursesFormField { +class NCURSES_IMPEXP NCursesFormField { friend class NCursesForm; protected: @@ -265,7 +266,7 @@ public: OnError(::set_field_buffer(field,buffer,val)); } - // Retrieve the value of a fields buffer. The defaukt buffer is nr. 0 + // Retrieve the value of a fields buffer. The default buffer is nr. 0 inline char* value(int buffer = 0) const { return ::field_buffer(field,buffer); } @@ -288,7 +289,7 @@ public: // The class representing a form, wrapping the lowlevel FORM struct // ------------------------------------------------------------------------- // -class NCursesForm : public NCursesPanel { +class NCURSES_IMPEXP NCursesForm : public NCursesPanel { protected: FORM* form; // the lowlevel structure @@ -541,7 +542,7 @@ public: // data belongs to some class T. Use T as template argument // to create a UserField. // ------------------------------------------------------------------------- -template class NCursesUserField : public NCursesFormField +template class NCURSES_IMPEXP NCursesUserField : public NCursesFormField { public: NCursesUserField (int rows, @@ -574,7 +575,7 @@ public: // The same mechanism is used to attach user data to a form // ------------------------------------------------------------------------- // -template class NCursesUserForm : public NCursesForm +template class NCURSES_IMPEXP NCursesUserForm : public NCursesForm { protected: // 'Internal' constructor, builds an object without association to a @@ -637,7 +638,7 @@ public: // Builtin Fieldtypes // ------------------------------------------------------------------------- // -class Alpha_Field : public NCursesFieldType { +class NCURSES_IMPEXP Alpha_Field : public NCursesFieldType { private: int min_field_width; @@ -652,7 +653,7 @@ public: } }; -class Alphanumeric_Field : public NCursesFieldType { +class NCURSES_IMPEXP Alphanumeric_Field : public NCursesFieldType { private: int min_field_width; @@ -667,7 +668,7 @@ public: } }; -class Integer_Field : public NCursesFieldType { +class NCURSES_IMPEXP Integer_Field : public NCursesFieldType { private: int precision; long lower_limit, upper_limit; @@ -684,7 +685,7 @@ public: } }; -class Numeric_Field : public NCursesFieldType { +class NCURSES_IMPEXP Numeric_Field : public NCursesFieldType { private: int precision; double lower_limit, upper_limit; @@ -701,7 +702,7 @@ public: } }; -class Regular_Expression_Field : public NCursesFieldType { +class NCURSES_IMPEXP Regular_Expression_Field : public NCursesFieldType { private: char* regex; @@ -712,8 +713,8 @@ private: public: Regular_Expression_Field(const char *expr) : NCursesFieldType(TYPE_REGEXP) { - regex = new char[1+::strlen(expr)]; - (strcpy)(regex,expr); + regex = new char[1 + ::strlen(expr)]; + (::strcpy)(regex,expr); } ~Regular_Expression_Field() { @@ -721,7 +722,7 @@ public: } }; -class Enumeration_Field : public NCursesFieldType { +class NCURSES_IMPEXP Enumeration_Field : public NCursesFieldType { private: char** list; int case_sensitive; @@ -742,7 +743,7 @@ public: } }; -class IPV4_Address_Field : public NCursesFieldType { +class NCURSES_IMPEXP IPV4_Address_Field : public NCursesFieldType { private: void set(NCursesFormField& f) { OnError(::set_field_type(f.get_field(),fieldtype)); @@ -757,7 +758,7 @@ public: // Abstract base class for User-Defined Fieldtypes // ------------------------------------------------------------------------- // -class UserDefinedFieldType : public NCursesFieldType { +class NCURSES_IMPEXP UserDefinedFieldType : public NCursesFieldType { friend class UDF_Init; // Internal helper to set up statics private: // For all C++ defined fieldtypes we need only one generic lowlevel @@ -793,7 +794,7 @@ public: // Abstract base class for User-Defined Fieldtypes with Choice functions // ------------------------------------------------------------------------- // -class UserDefinedFieldType_With_Choice : public UserDefinedFieldType { +class NCURSES_IMPEXP UserDefinedFieldType_With_Choice : public UserDefinedFieldType { friend class UDF_Init; // Internal helper to set up statics private: // For all C++ defined fieldtypes with choice functions we need only one @@ -820,5 +821,5 @@ public: } }; -#endif // _CURSESF_H +#endif // NCURSES_CURSESF_H_incl