"""
LoG module documentation
"""
from __future__ import annotations
import collections.abc
import typing
from . import Date
from . import VT
__all__: list[str] = ['Date', 'Diary', 'DiaryElemTag', 'DiaryElement', 'Entry', 'FT', 'HiddenFormat', 'Named', 'ParaInhClass', 'Paragraph', 'ParserBackGround', 'SCtg', 'TableColumn', 'TableLine', 'VT', 'get_user_input', 'refresh_panels', 'show_element', 'show_message', 'update_for_new_entry']
class Diary(DiaryElement):
    @staticmethod
    def get_main() -> Diary:
        """
        Returns the currently opened main Diary
        """
    def create_entry(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> Entry:
        """
        Creates an empty Entry and adds it to the end of hierarchy
        Parameters:
        title_style: Title style (VT.ETS) to be used in the created Entry
        returns: the newly created Entry
        """
    def create_entry_child(self, entry_parent: Entry, text: str = '') -> Entry:
        """
        Creates an Entry with given text as the last child of entry_parent
        Parameters:
        entry_parent: Parent Entry
        text: Contents for the new Entry (optional)
        returns: The newly created Entry
        """
    def create_entry_rel(self, entry_rel: Entry, is_parent: bool, text: str = '') -> Entry:
        """
        Creates an Entry with given text and places it in the specified position
        Parameters:
        entry_rel: Related Entry, a parent or sibling. If it is None, Entry will be added as a top level
        F_parent: If True entry_rel is a parent else a sibling. If True, Entry is added as the first child to the entry_rel. If entry_rel is None, determines if entry will be added to the beginning (False) or end (True)
        text: Contents for the new Entry (optional)returns: The newly created Entry
        """
    def get_entry_by_id(self, id: typing.SupportsInt | typing.SupportsIndex) -> Entry:
        """
        Returns the Entry with the given id if any
        """
    def get_entry_by_name(self, name: str) -> Entry:
        """
        Returns the first Entry with the given name
        Please note that there may be multiple entries sharing a name
        """
    def get_entry_by_name_fuzzy(self, name: str) -> Entry:
        """
        Returns the Entry with the name most closely matching the argument
        """
    def get_paragraph_by_id(self, id: typing.SupportsInt | typing.SupportsIndex) -> Paragraph:
        """
        Returns the Paragraph with the given id if any
        """
    def get_rel_folder_name(self) -> str:
        """
        Returns the name of the relative folder for the current entry which takes the form [DIARYNAME] (sanitized)
        """
    def get_rel_folder_path(self) -> str:
        """
        Returns path to the relative folder for the current entry which is a subfolder in the Diary's folder in the form [DIARYNAME]
        """
    def get_size(self) -> int:
        """
        Returns the number of entries in the Diary
        """
    def get_tag_by_id(self, id: typing.SupportsInt | typing.SupportsIndex) -> DiaryElemTag:
        """
        Returns the DiaryElemTag with the given id if any
        """
class DiaryElemTag(DiaryElement):
    """
    Base class for Paragraphs and Entries.
    
    Diary elements are objects stored inside a diary.
    They have an ID and occupy space.
    """
    def get_ancestry_path(self) -> str:
        ...
    def get_date(self) -> int:
        ...
    def get_date_finish(self) -> int:
        ...
    def get_description(self) -> str:
        ...
    def is_expanded(self) -> bool:
        ...
    def set_expanded(self, arg0: bool) -> None:
        ...
class DiaryElement(Named):
    """
    Base class for all diary elements.
    
    Diary elements are objects stored inside a diary.
    They have an ID and occupy space.
    """
    def get_id(self) -> int:
        ...
    def get_size(self) -> int:
        ...
class Entry(DiaryElemTag):
    def __iter__(self) -> collections.abc.Iterator[Paragraph]:
        ...
    def add_paragraph_before(self, text: str, para_after: Paragraph) -> Paragraph:
        """
        Creates a paragraph and places it before another
        Parameters:
        text: The content of the new paragraph (mustn't contain new line char)
        para_after: The paragraph before which the new para will be inserted
        returns: The newly created paragraph
        """
    def add_paragraphs_after(self, para_first_to_add: Paragraph, para_before: Paragraph, inheritance_classes: ParaInhClass = ...) -> Paragraph:
        """
        Add Paragraph chain starting with para_first_to_add
        """
    def append_paragraph(self, text: str) -> Paragraph:
        """
        Creates a paragraph and adds it to the end of the entry
        Parameters:
        text: The content of the new paragraph (mustn't contain new line char)
        returns: The newly created paragraph
        """
    def beautify(self, para_begin: Paragraph, para_end: Paragraph) -> None:
        """
        Beautify the text in the specified range
        Converts * to bullet, removes excessive empty lines, etc..
        Parameters:
        para_begin: first paragraph to beautify
        para_end: last paragraph to beautify
        """
    def get_completion(self) -> float:
        """
        Returns the completion percentage of the Entry as a float between in [0,1] interval
        """
    def get_completion_str(self) -> str:
        """
        Get Entry completion as a string with both percentage and fraction
        """
    def get_paragraph(self, para_no: typing.SupportsInt | typing.SupportsIndex) -> Paragraph:
        """
        Returns a Paragraph from the Entry by order (first paragraph is 0)
        """
    def get_paragraph_last(self) -> Paragraph:
        """
        Returns the last Paragraph of the Entry
        """
    def get_parent(self) -> Entry:
        """
        Returns the Entry's parent Entry if any or None
        """
    def get_text(self) -> str:
        """
        Returns the Entry's text
        """
    @typing.overload
    def remove_paragraphs(self, para_begin: Paragraph, para_end: Paragraph = None, F_add_undo: bool = True) -> None:
        """
        Remove Paragraphs begin, end, and anything between from the Entry
        Only removes a single Paragraph when end is None
        Parameters:
        para_begin: The first Paragraph to remove
        para_end: The last Paragraph to remove
        F_add_undo: If the action will be undoable
        """
    @typing.overload
    def remove_paragraphs(self, para_no_begin: typing.SupportsInt | typing.SupportsIndex, para_no_end: typing.SupportsInt | typing.SupportsIndex = -1, F_add_undo: bool = True) -> None:
        """
        Remove Paragraphs by order between para_no_begin and para_no_end from the Entry
        Only removes a single Paragraph when para_no_end < para_no_begin
        """
    def set_text(self, text: str) -> None:
        """
        Sets the Entry's text
        Does not update Entry's edit date. Clears undo history
        """
class FT:
    """
    Types for user input fields
    
    Members:
    
      DATE
    
      CHECK
    
      OPTION
    
      TEXT
    
      FILE
    
      FOLDER
    
      TAG
    
      FILTER
    
      HIDDEN
    """
    CHECK: typing.ClassVar[FT]  # value = <FT.CHECK: 0>
    DATE: typing.ClassVar[FT]  # value = <FT.DATE: 3>
    FILE: typing.ClassVar[FT]  # value = <FT.FILE: 4>
    FILTER: typing.ClassVar[FT]  # value = <FT.FILTER: 7>
    FOLDER: typing.ClassVar[FT]  # value = <FT.FOLDER: 5>
    HIDDEN: typing.ClassVar[FT]  # value = <FT.HIDDEN: 8>
    OPTION: typing.ClassVar[FT]  # value = <FT.OPTION: 1>
    TAG: typing.ClassVar[FT]  # value = <FT.TAG: 6>
    TEXT: typing.ClassVar[FT]  # value = <FT.TEXT: 2>
    __members__: typing.ClassVar[dict[str, FT]]  # value = {'DATE': <FT.DATE: 3>, 'CHECK': <FT.CHECK: 0>, 'OPTION': <FT.OPTION: 1>, 'TEXT': <FT.TEXT: 2>, 'FILE': <FT.FILE: 4>, 'FOLDER': <FT.FOLDER: 5>, 'TAG': <FT.TAG: 6>, 'FILTER': <FT.FILTER: 7>, 'HIDDEN': <FT.HIDDEN: 8>}
    def __eq__(self, other: typing.Any) -> bool:
        ...
    def __getstate__(self) -> int:
        ...
    def __hash__(self) -> int:
        ...
    def __index__(self) -> int:
        ...
    def __init__(self, value: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    def __int__(self) -> int:
        ...
    def __ne__(self, other: typing.Any) -> bool:
        ...
    def __repr__(self) -> str:
        ...
    def __setstate__(self, state: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    def __str__(self) -> str:
        ...
    @property
    def name(self) -> str:
        ...
    @property
    def value(self) -> int:
        ...
class HiddenFormat:
    uri: str
    def __init__(self, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: str, arg2: typing.SupportsInt | typing.SupportsIndex, arg3: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    @property
    def pos_bgn(self) -> int:
        ...
    @pos_bgn.setter
    def pos_bgn(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    @property
    def pos_end(self) -> int:
        ...
    @pos_end.setter
    def pos_end(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    @property
    def ref_id(self) -> int:
        ...
    @ref_id.setter
    def ref_id(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    @property
    def type(self) -> int:
        ...
    @type.setter
    def type(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    @property
    def var_d(self) -> int:
        ...
    @var_d.setter
    def var_d(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    @property
    def var_i(self) -> int:
        ...
    @var_i.setter
    def var_i(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
class Named:
    def get_name(self) -> str:
        ...
class ParaInhClass:
    """
    Paragraph Inheritance Class
    
    Members:
    
      QUOT_TYPE
    
      LIST_TYPE
    
      HEADING_LVL
    
      INDENTATION
    
      DEFAULT
    
      NONE
    
      SET_TEXT
    """
    DEFAULT: typing.ClassVar[ParaInhClass]  # value = <ParaInhClass.DEFAULT: 11>
    HEADING_LVL: typing.ClassVar[ParaInhClass]  # value = <ParaInhClass.HEADING_LVL: 4>
    INDENTATION: typing.ClassVar[ParaInhClass]  # value = <ParaInhClass.INDENTATION: 8>
    LIST_TYPE: typing.ClassVar[ParaInhClass]  # value = <ParaInhClass.LIST_TYPE: 2>
    NONE: typing.ClassVar[ParaInhClass]  # value = <ParaInhClass.NONE: 0>
    QUOT_TYPE: typing.ClassVar[ParaInhClass]  # value = <ParaInhClass.QUOT_TYPE: 1>
    SET_TEXT: typing.ClassVar[ParaInhClass]  # value = <ParaInhClass.SET_TEXT: 2097152>
    __members__: typing.ClassVar[dict[str, ParaInhClass]]  # value = {'QUOT_TYPE': <ParaInhClass.QUOT_TYPE: 1>, 'LIST_TYPE': <ParaInhClass.LIST_TYPE: 2>, 'HEADING_LVL': <ParaInhClass.HEADING_LVL: 4>, 'INDENTATION': <ParaInhClass.INDENTATION: 8>, 'DEFAULT': <ParaInhClass.DEFAULT: 11>, 'NONE': <ParaInhClass.NONE: 0>, 'SET_TEXT': <ParaInhClass.SET_TEXT: 2097152>}
    def __eq__(self, other: typing.Any) -> bool:
        ...
    def __ge__(self, other: typing.Any) -> bool:
        ...
    def __getstate__(self) -> int:
        ...
    def __gt__(self, other: typing.Any) -> bool:
        ...
    def __hash__(self) -> int:
        ...
    def __index__(self) -> int:
        ...
    def __init__(self, value: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    def __int__(self) -> int:
        ...
    def __le__(self, other: typing.Any) -> bool:
        ...
    def __lt__(self, other: typing.Any) -> bool:
        ...
    def __ne__(self, other: typing.Any) -> bool:
        ...
    def __repr__(self) -> str:
        ...
    def __setstate__(self, state: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    def __str__(self) -> str:
        ...
    @property
    def name(self) -> str:
        ...
    @property
    def value(self) -> int:
        ...
class Paragraph(DiaryElemTag):
    @typing.overload
    def add_format(self, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex, arg2: typing.SupportsInt | typing.SupportsIndex) -> HiddenFormat:
        ...
    @typing.overload
    def add_format(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> HiddenFormat:
        """
        Convenience method for adding a format to the whole paragraph
        """
    def add_link(self, arg0: str, arg1: typing.SupportsInt | typing.SupportsIndex, arg2: typing.SupportsInt | typing.SupportsIndex) -> HiddenFormat:
        ...
    def add_tag(self, arg0: DiaryElemTag, arg1: typing.SupportsInt | typing.SupportsIndex) -> HiddenFormat:
        ...
    def erase_text(self, pos_bgn: typing.SupportsInt | typing.SupportsIndex, len_erase: typing.SupportsInt | typing.SupportsIndex, F_add_undo: bool = True) -> None:
        ...
    def get_alignment(self) -> int:
        ...
    def get_code_lang(self) -> str:
        ...
    def get_format_at(self, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsInt | typing.SupportsIndex) -> HiddenFormat:
        ...
    def get_formats(self) -> list[HiddenFormat]:
        ...
    def get_heading_level(self) -> int:
        ...
    def get_host(self) -> Entry:
        """
        Get the host Entry
        """
    def get_image_size(self) -> int:
        ...
    def get_indent_level(self) -> int:
        ...
    def get_last_sub(self) -> Paragraph:
        ...
    def get_latitude(self) -> float:
        ...
    def get_list_type(self) -> int:
        ...
    def get_longitude(self) -> float:
        ...
    def get_next(self) -> Paragraph:
        ...
    def get_next_sibling(self) -> Paragraph:
        ...
    def get_parent(self) -> Paragraph:
        ...
    def get_prev(self) -> Paragraph:
        ...
    def get_prev_sibling(self) -> Paragraph:
        ...
    def get_quot_type(self) -> str:
        ...
    def get_subtag_first(self, arg0: DiaryElemTag) -> DiaryElemTag:
        ...
    def get_subtag_highest(self, arg0: DiaryElemTag) -> DiaryElemTag:
        ...
    def get_subtag_last(self, arg0: DiaryElemTag) -> DiaryElemTag:
        ...
    def get_subtag_lowest(self, arg0: DiaryElemTag) -> DiaryElemTag:
        ...
    def get_tag_def_bound(self) -> int:
        ...
    def get_text(self) -> str:
        ...
    def get_uri(self) -> str:
        ...
    def has_hrule(self) -> bool:
        ...
    def has_location(self) -> bool:
        """
        Returns True if the Paragraph has map location
        """
    def insert_text(self, pos: typing.SupportsInt | typing.SupportsIndex, text: str, F_add_undo: bool = True) -> None:
        ...
    def is_code(self) -> bool:
        ...
    def is_empty_completely(self) -> bool:
        ...
    def is_expanded(self) -> bool:
        ...
    def is_image(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> bool:
        ...
    def is_quote(self) -> bool:
        ...
    def move_to_entry(self, new_host: Entry, para_before: Paragraph = None) -> None:
        """
        Move Paragraph to a different Entry after para_before. Appends to end if para_before is None.
         Clears undo history of the source Entry
        """
    def remove_format(self, arg0: HiddenFormat) -> None:
        ...
    def replace_text(self, pos_bgn: typing.SupportsInt | typing.SupportsIndex, len_erase: typing.SupportsInt | typing.SupportsIndex, new_text: str, F_add_undo: bool = True) -> None:
        ...
    def set_alignment(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    def set_expanded(self, arg0: bool) -> None:
        ...
    def set_heading_level(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    def set_hrule(self, arg0: bool) -> None:
        ...
    def set_image_size(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        """
        Image size has to be an integer between [0,3]
        """
    def set_image_type(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        """
        Set the image type as FILE, CHART or TABLE. Setting to 0 clears
        """
    def set_indent_level(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> bool:
        ...
    def set_list_type(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    def set_location(self, arg0: typing.SupportsFloat | typing.SupportsIndex, arg1: typing.SupportsFloat | typing.SupportsIndex) -> None:
        """
        Set map location of a Paragraph as latitude and longitude
        """
    def set_quot_type(self, arg0: str) -> None:
        ...
    def set_quote(self, arg0: bool) -> None:
        ...
    def set_tag_def_bound(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    def set_text(self, text_new: str, F_add_undo: bool = True) -> None:
        ...
    def set_uri(self, arg0: str) -> None:
        ...
class ParserBackGround:
    def __init__(self, arg0: Diary) -> None:
        ...
class SCtg:
    """
    Members:
    
      TBD
    
      NONE
    
      IMPORTER
    
      EXPORTER
    
      TABLE_COLUMN
    
      WORD_MODIFIER
    
      PARA_MODIFIER
    
      ENTRY_MODIFIER
    
      FILTER
    """
    ENTRY_MODIFIER: typing.ClassVar[SCtg]  # value = <SCtg.ENTRY_MODIFIER: 7>
    EXPORTER: typing.ClassVar[SCtg]  # value = <SCtg.EXPORTER: 3>
    FILTER: typing.ClassVar[SCtg]  # value = <SCtg.FILTER: 8>
    IMPORTER: typing.ClassVar[SCtg]  # value = <SCtg.IMPORTER: 2>
    NONE: typing.ClassVar[SCtg]  # value = <SCtg.NONE: 1>
    PARA_MODIFIER: typing.ClassVar[SCtg]  # value = <SCtg.PARA_MODIFIER: 6>
    TABLE_COLUMN: typing.ClassVar[SCtg]  # value = <SCtg.TABLE_COLUMN: 4>
    TBD: typing.ClassVar[SCtg]  # value = <SCtg.TBD: 0>
    WORD_MODIFIER: typing.ClassVar[SCtg]  # value = <SCtg.WORD_MODIFIER: 5>
    __members__: typing.ClassVar[dict[str, SCtg]]  # value = {'TBD': <SCtg.TBD: 0>, 'NONE': <SCtg.NONE: 1>, 'IMPORTER': <SCtg.IMPORTER: 2>, 'EXPORTER': <SCtg.EXPORTER: 3>, 'TABLE_COLUMN': <SCtg.TABLE_COLUMN: 4>, 'WORD_MODIFIER': <SCtg.WORD_MODIFIER: 5>, 'PARA_MODIFIER': <SCtg.PARA_MODIFIER: 6>, 'ENTRY_MODIFIER': <SCtg.ENTRY_MODIFIER: 7>, 'FILTER': <SCtg.FILTER: 8>}
    def __eq__(self, other: typing.Any) -> bool:
        ...
    def __getstate__(self) -> int:
        ...
    def __hash__(self) -> int:
        ...
    def __index__(self) -> int:
        ...
    def __init__(self, value: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    def __int__(self) -> int:
        ...
    def __ne__(self, other: typing.Any) -> bool:
        ...
    def __repr__(self) -> str:
        ...
    def __setstate__(self, state: typing.SupportsInt | typing.SupportsIndex) -> None:
        ...
    def __str__(self) -> str:
        ...
    @property
    def name(self) -> str:
        ...
    @property
    def value(self) -> int:
        ...
class TableColumn(Named):
    def format_number(self, arg0: TableLine) -> None:
        ...
    def get_index(self) -> int:
        ...
class TableLine:
    def get_elem(self) -> DiaryElemTag:
        ...
    def get_value_num(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> float:
        ...
    def get_value_txt(self, arg0: typing.SupportsInt | typing.SupportsIndex) -> str:
        ...
    def set_value_num(self, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: typing.SupportsFloat | typing.SupportsIndex, arg2: typing.SupportsFloat | typing.SupportsIndex) -> None:
        ...
    def set_value_txt(self, arg0: typing.SupportsInt | typing.SupportsIndex, arg1: str) -> None:
        ...
def get_user_input(*args, **kwargs) -> None:
    """
    Displays a dialog for collecting user input and executes a script upon completion
    Parameters:
    info: Descriptive test to be shown on the dialog
    name: Name of the script to call upon completion 
    cb_name: Name of the callback funtion in that script
    fields: List of input fields as a fields in the form of FTs
    """
def refresh_panels() -> None:
    """
    Refreshes text editor, entry list, and the extra panel to reflect changes
    """
def show_element(id: typing.SupportsInt | typing.SupportsIndex) -> None:
    """
    Shows the DiaryElement with the id if it exists (Works for Entries, Paragraphs, Charts, and Tables)
    """
def show_message(message: str) -> None:
    """
    Displays the given message in the info bar
    """
def update_for_new_entry(entry: Entry) -> None:
    """
    Adds entry to the list and displays it
    """
