DEFINITION MODULE DomainPage;

        (****************************************************************)
        (*                                                              *)
        (*                      PM Setup for Weasel                     *)
        (*             The 'our domains' page of the notebook           *)
        (*                                                              *)
        (*        Started:        19 December 2001                      *)
        (*        Last edited:    3 September 2024                      *)
        (*        Status:         OK                                    *)
        (*                                                              *)
        (****************************************************************)


FROM OS2 IMPORT HWND;
FROM CommonSettings IMPORT FontName;
FROM Names IMPORT (* type *) DomainName;
FROM Languages IMPORT LangHandle;


PROCEDURE StoreData;

    (* Stores back the domain list if it has changed. *)

PROCEDURE CreatePage (notebook: HWND;  AfterPage: CARDINAL;
                          CreateWildAliases, NewStyle, TNImode: BOOLEAN;
                                      VAR (*OUT*) ID: CARDINAL): HWND;

    (* Creates the domain list page, and adds it to the notebook.  *)

PROCEDURE NumberOfDomains(): CARDINAL;

    (* Returns the number of domains currently defined. *)

PROCEDURE ConditionalEncryptPassword (VAR (*INOUT*) pass: ARRAY OF CHAR);

    (* Converts pass to encrypted form iff we are currently keeping *)
    (* passwords in encrypted form.                                 *)

PROCEDURE SetLanguage (lang: LangHandle);

    (* Relabels this page in the new language. *)

PROCEDURE SetFont (VAR (*IN*) name: FontName);

    (* Sets the font of the text on this page. *)

PROCEDURE Close (notebook: HWND);

    (* Shuts down this window and removes it from the notebook. *)

PROCEDURE Add (name: DomainName);

    (* Creates a new domain.  Should be called only after the page      *)
    (* has been made visible by CreatePage.                             *)

PROCEDURE Remove (name: DomainName);

    (* Deletes a domain. *)

END DomainPage.

