# coding: utf-8
#
# Copyright 2023 :Barry-Thomas-Paul: Moss
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http: // www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Service Class
# this is a auto generated file generated by Cheetah
# Libre Office Version: 7.4
# Namespace: com.sun.star.ui.dialogs
from __future__ import annotations
from abc import abstractmethod
from .x_file_picker3 import XFilePicker3 as XFilePicker3_f99e0d60

class FilePicker(XFilePicker3_f99e0d60):
    """
    Service Class

    A FilePicker.
    
    It is NOT recommended to cache a reference to a file picker instance. Due to restrictions by the underlying system there can be specific limitations possible. To overcome these problems it's recommended to create a new instance on demand.

    See Also:
        `API FilePicker <https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1ui_1_1dialogs_1_1FilePicker.html>`_
    """
    __ooo_ns__: str = 'com.sun.star.ui.dialogs'
    __ooo_full_ns__: str = 'com.sun.star.ui.dialogs.FilePicker'
    __ooo_type_name__: str = 'service'

    @abstractmethod
    def createWithMode(self, Mode: int) -> None:
        """
        Provides the ability to choose between different custom templates that do extend the subset of common controls a FilePicker usually supports.
        
        Implementers may omit this interface if the FileOpen dialog doesn't support custom templates. In this case a createInstance will create an ordinary FileOpen dialog with only the common FilePicker elements. The client has to provide one of the specified constants in TemplateDescription.
        
        Notes for the implementation of a FileSave dialog: The implementation of a FileSave dialog should automatically check for existence of a file and issue a warning if a file with the same name already exist.
        
        Note that when creating a file picker, the top window is selected as the parent window for the file picker. Make sure that it does not get closed while opening the file picker, as there is a potential race.
        """
        ...

__all__ = ['FilePicker']

