summaryrefslogtreecommitdiffstats
path: root/share/extensions/inkex/gui/__init__.py
blob: 27e1b0bd6b54360e0307eae7e10dccd620da07dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#
# Copyright 2011-2022 Martin Owens <doctormo@geek-2.com>
#
# This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>
#
# pylint: disable=wrong-import-position
"""
This a wrapper layer to make interacting with Gtk a little less painful.
The main issues with Gtk is that it expects an aweful lot of the developer,
code which is repeated over and over and patterns which every single developer
will use are not given easy to use convience functions.

This makes Gtk programming WET, unattractive and error prone. This module steps
inbetween and adds in all those missing bits. It's not meant to replace Gtk and
certainly it's possible to use Gtk and threading directly.

.. versionadded:: 1.2
"""

import threading
import os
import logging

from ..utils import DependencyError

try:
    import gi

    gi.require_version("Gtk", "3.0")
except ImportError:  # pragma: no cover
    raise DependencyError(
        "You are missing the required libraries for Gtk."
        " Please report this problem to the Inkscape developers."
    )

from .app import GtkApp
from .window import Window, ChildWindow, FakeWidget
from .listview import TreeView, IconView, ViewColumn, ViewSort, Separator
from .pixmap import PixmapManager