Roxen.git / server / etc / modules / Variable.pmod / module.pmod

version» Context lines:

Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1: - // $Id: module.pmod,v 1.36 2000/11/20 13:36:36 per Exp $ + // $Id: module.pmod,v 1.37 2000/11/24 16:50:35 per Exp $      #include <module.h>   #include <roxen.h>      // Locale macros   //<locale-token project="roxen_config"> LOCALE </locale-token>      #define LOCALE(X,Y) \    ([string](mixed)Locale.translate("roxen_config",roxenp()->locale->get(),X,Y))   
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:30:    constant is_variable = 1;       constant type = "Basic";    //! Mostly used for debug (sprintf( "%O", variable_obj ) uses it)       int _id = unique_vid++;    // used for indexing the mappings.       static mixed _initial; // default value    static string _path; // used for forms -  static string|object __name, __doc; +  static LocaleString __name, __doc;       void destroy()    {    // clean up...    m_delete( all_flags, _id );    m_delete( all_warnings, _id );    m_delete( invisibility_callbacks, _id );    m_delete( changed_values, _id );    }   
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:150:    oc = ({ oc, cb }) - ({ 0 });    changed_callbacks[ _id ] = oc;    }       function(RequestID,Variable:int) get_invisibility_check_callback()    //! Return the current invisibility check callback    {    return invisibility_callbacks[_id];    }    -  string doc( ) +  LocaleString doc( )    //! Return the documentation for this variable (locale dependant).    //!    //! The default implementation queries the locale object in roxen    //! to get the documentation.    {    return __doc || "";    }    -  string name( ) +  LocaleString name( )    //! Return the name of this variable (locale dependant).    //!    //! The default implementation queries the locale object in roxen    //! to get the documentation.    {    return __name || LOCALE(326,"unnamed")+" "+_id;    }    -  string type_hint( ) +  LocaleString type_hint( )    //! Return the type hint for this variable.    //! Type hints are generic documentation for this variable type,    //! and is the same for all instances of the type.    {    }       mixed default_value()    //! The default (initial) value for this variable.    {    return _initial;
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:379:    return Roxen.html_encode_string( (string)v );    }       static string _sprintf( int i )    {    if( i == 'O' )    return sprintf( "Variable.%s(%s)",type,(string)name());    }       static void create(mixed default_value, void|int flags, -  void|string|object std_name, void|string|object std_doc) +  void|LocaleString std_name, void|LocaleString std_doc)    //! Constructor.    //! Flags is a bitwise or of one or more of    //!    //! VAR_EXPERT Only for experts    //! VAR_MORE Only visible when more-mode is on (default on)    //! VAR_DEVELOPER Only visible when devel-mode is on (default on)    //! VAR_INITIAL Should be configured initially.    //!    //! The std_name and std_doc is the name and documentation string    //! for the default locale (always english)
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:776:    if (!selected)    // Make an entry for the current value if it's not in the list,    // so no other value appears to be selected, and to ensure that    // the value doesn't change as a side-effect by another change.    res += " " + Roxen.make_container (    "option", (["value":_name(current), "selected": "selected"]),    sprintf(LOCALE(332,"(keep stale value %s)"),_name(current)));    return res + "</select>";    }    static void create( mixed default_value, array|mapping choices, -  int _flags, string|object std_name, -  string|object std_doc ) +  int _flags, LocaleString std_name, +  LocaleString std_doc )    //! Constructor.    //!    //! Choices is the list of possible choices, can be set with    //! set_choice_list at any time.    //!    //! Flags is a bitwise or of one or more of    //!    //! VAR_EXPERT Only for experts    //! VAR_MORE Only visible when more-mode is on (default on)    //! VAR_DEVELOPER Only visible when devel-mode is on (default on)
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:869:    inherit StringChoice;    constant type = "FontChoice";    void set_choice_list()    {    }    array get_choice_list()    {    return roxenp()->fonts->available_fonts();    }    static void create(mixed default_value,int flags, -  string|object std_name,string|object std_doc) +  LocaleString std_name,LocaleString std_doc)    //! Constructor.    //! Flags is a bitwise or of one or more of    //!    //! VAR_EXPERT Only for experts    //! VAR_MORE Only visible when more-mode is on (default on)    //! VAR_DEVELOPER Only visible when devel-mode is on (default on)    //! VAR_INITIAL Should be configured initially.    //!    //! The std_name and std_doc is the name and documentation string    //! for the default locale (always english)