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.61 2001/08/05 20:12:36 nilsson Exp $ + // $Id: module.pmod,v 1.62 2001/08/08 23:12:46 nilsson 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:737:   }      // =====================================================================   // Text   // =====================================================================   class Text   //! Text (multi-line string) variable   {    inherit String;    constant type = "Text"; +     int cols = 60;    //! The width of the textarea -  +     int rows = 10;    //! The height of the textarea       string diff( int render )    {    switch( render )    {    case 0: return 0;    case 1: return "";    case 2:
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1008:    }    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,    void|int _flags, void|LocaleString std_name,    void|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    //!
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1101:   {    inherit StringChoice;    constant type = "FontChoice";    void set_choice_list()    {    }    array get_choice_list()    {    return roxenp()->fonts->available_fonts();    } +     static void create(mixed default_value, void|int flags,    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.    //!
Roxen.git/server/etc/modules/Variable.pmod/module.pmod:1130:   {    inherit StringChoice;    constant type = "DatabaseChoice";       function(void:void|object) config = lambda() { return 0; };       DatabaseChoice set_configuration_pointer( function(void:object) configuration )    //! Provide a function that returns a configuration object,    //! that will be used for authentication against the database    //! manager. Typically called as -  //! @code{set_configuration_pointer(my_configuration)}. +  //! @code{set_configuration_pointer(my_configuration)@}.    {    config = configuration;    return this_object();    }       array get_choice_list( )    {    return ({ " none" }) + sort(DBManager.list( config() ));    }