from vanilla.vanillaBase import VanillaBaseObject, VanillaBaseControl, VanillaError
from vanilla.vanillaBox import Box, HorizontalLine, VerticalLine
from vanilla.vanillaBrowser import ObjectBrowser
from vanilla.vanillaButton import Button, SquareButton, ImageButton, HelpButton
from vanilla.vanillaCheckBox import CheckBox
from vanilla.vanillaColorWell import ColorWell
from vanilla.vanillaComboBox import ComboBox
from vanilla.vanillaDatePicker import DatePicker
from vanilla.vanillaDrawer import Drawer
from vanilla.vanillaEditText import EditText, SecureEditText
from vanilla.vanillaGradientButton import GradientButton
from vanilla.vanillaGroup import Group
from vanilla.vanillaImageView import ImageView
from vanilla.vanillaLevelIndicator import LevelIndicator, LevelIndicatorListCell
from vanilla.vanillaList import List, CheckBoxListCell, SliderListCell, PopUpButtonListCell, ImageListCell, SegmentedButtonListCell
from vanilla.vanillaList2 import List2, List2GroupRow, EditTextList2Cell, GroupTitleList2Cell, SliderList2Cell, CheckBoxList2Cell, PopUpButtonList2Cell, ImageList2Cell, SegmentedButtonList2Cell, ColorWellList2Cell
from vanilla.vanillaPathControl import PathControl
from vanilla.vanillaPopUpButton import PopUpButton, ActionButton
from vanilla.vanillaPopover import Popover
from vanilla.vanillaProgressBar import ProgressBar
from vanilla.vanillaProgressSpinner import ProgressSpinner
from vanilla.vanillaRadioGroup import RadioGroup, VerticalRadioGroup, HorizontalRadioGroup, RadioButton
from vanilla.vanillaScrollView import ScrollView
from vanilla.vanillaSearchBox import SearchBox
from vanilla.vanillaSegmentedButton import SegmentedButton
from vanilla.vanillaSlider import Slider
from vanilla.vanillaSplitView import SplitView, SplitView2
from vanilla.vanillaStackGroup import HorizontalStackGroup, VerticalStackGroup
from vanilla.vanillaStackView import HorizontalStackView, VerticalStackView
from vanilla.vanillaTabs import Tabs
from vanilla.vanillaTextBox import TextBox
from vanilla.vanillaTextEditor import TextEditor
from vanilla.vanillaWindows import Window, FloatingWindow, HUDFloatingWindow, Sheet
from vanilla.dragAndDrop import startDraggingSession, DropTargetProtocolMixIn

__all__ = [
    "VanillaBaseObject", "VanillaBaseControl", "VanillaError",
    "Box", "HorizontalLine", "VerticalLine",
    "Button", "SquareButton", "ImageButton", "HelpButton",
    "CheckBox",
    "ColorWell",
    "ComboBox",
    "DatePicker",
    "Drawer",
    "EditText",
    "GradientButton",
    "Group",
    "ImageView",
    "LevelIndicator", "LevelIndicatorListCell",
    "List", "CheckBoxListCell", "SliderListCell", "PopUpButtonListCell", "ImageListCell", "SegmentedButtonListCell",
    "List2", "List2GroupRow", "EditTextList2Cell", "GroupTitleList2Cell", "SliderList2Cell", "CheckBoxList2Cell", "PopUpButtonList2Cell", "ImageList2Cell", "SegmentedButtonList2Cell", "ColorWellList2Cell",
    "ObjectBrowser",
    "PathControl",
    "PopUpButton", "ActionButton",
    "Popover",
    "ProgressBar",
    "ProgressSpinner",
    "RadioGroup", "VerticalRadioGroup", "HorizontalRadioGroup", "RadioButton",
    "ScrollView",
    "SearchBox",
    "SecureEditText",
    "SegmentedButton",
    "Slider",
    "SplitView",
    "SplitView2",
    "HorizontalStackGroup", "VerticalStackGroup",
    "HorizontalStackView", "VerticalStackView",
    "Tabs",
    "TextBox",
    "TextEditor",
    "Window", "FloatingWindow", "HUDFloatingWindow", "Sheet",

    "startDraggingSession",
    "DropTargetProtocolMixIn"
    ]


try:
    from ._version import version as __version__
except ImportError:
    __version__ = "<unknown>"


# NSGridview is available from OS 10.12+
try:
    from AppKit import NSGridView
except ImportError:
    pass
else:
    from vanilla.vanillaGridView import GridView
    __all__.append("GridView")
