# -*- coding: utf-8 -*-
from distutils.core import setup

packages = \
['gaphas', 'gaphas.tests']

package_data = \
{'': ['*']}

install_requires = \
['PyGObject>=3.20.0,<4.0.0',
 'decorator>=4.3.0,<5.0.0',
 'future>=0.17.0,<0.18.0',
 'pycairo>=1.10.0,<2.0.0',
 'simplegeneric>=0.8.1,<0.9.0']

entry_points = \
{'console_scripts': ['poetry = poetry.console:main']}

setup_kwargs = {
    'name': 'gaphas',
    'version': '1.0.0rc1',
    'description': 'Gaphas is a GTK+ based diagramming widget',
    'long_description': 'Gaphas\n======\n\n|Code style: black|\n|Build status|\n|Coverage|\n\nThis module contains a new canvas implementation for Gaphor.\n\nThe basic idea is:\n\n- Items (canvas items) can be added to a Canvas.\n- The canvas maintains the tree structure (parent-child relationships between\n  items).\n- A constraint solver is used to maintain item constraints and inter-item\n  constraints.\n- The item (and user) should not be bothered with things like bounding-box\n  calculations.\n- Very modular: e.g. handle support could be swapped in and swapped out.\n- Rendering using Cairo.\n\n Gaphas is released under the terms of the GNU Library General Public License\n (LGPL). See the COPYING file for details.\n\n.. contents::\n\n\nHow it Works\n============\n\nThe Canvas class (from canvas.py) acts as a container for Item\'s (from item.py).\nThe item\'s parent/child relationships are maintained here (not in the Item!).\n\nAn Item can have a set of Handle\'s (from connector.py) which can be used to\nmanipulate the item (although this is not necessary). Each item has it\'s own\ncoordinate system (a (0, 0) point). Item.matrix is the transformation\nrelative to the parent item of the Item, as defined in the Canvas.\nHandles can connect to Ports. A Port is a location (line or point) where a\nhandle is allowed to connect on another item. The process of connecting\ndepends on the case at hand, but most often involves the creation of some\nsort of constraint between the Handle and the item it\'s connecting to (see\ndoc/ports.txt).\n\nThe Canvas also contains a constraint Solver (from solver.py) that can be used\nto solve mathematical dependencies between items (such as Handles that should\nbe aligned). The constraint solver is also a handy tool to keep constraint\nin the item true (e.g. make sure a box maintains it\'s rectangular shape).\n\nView (from view.py) is used to visualize a canvas. On a View, a Tool\n(from tool.py) can be applied, which will handle user input (button presses,\nkey presses, etc.). Painters (from painter.py) are used to do the actual\ndrawing. This way it should be easy do draw to other media than the screen,\nsuch as a printer or PDF document.\n\nUpdating item state\n-------------------\nIf an items needs updating, it sets out an update request on the Canvas\n(Canvas.request_update()). The canvas performs an update by calling:\n\n1. Item.pre_update(context) for each item marked for update\n2. Updating Canvas-to-Item matrices, for fast transformation of coordinates\n   from the canvas\' to the items\' coordinate system.\n   The c2i matrix is stored on the Item as Item._matrix_c2i.\n3. Solve constraints.\n4. Normalize items by setting the coordinates of the first handle to (0, 0).\n5. Updating Canvas-to-Item matrices for items that have been changed by\n   normalization, just to be on the save side.\n6. Item.post_update(context) for each item marked for update, including items\n   that have been marked during constraint solving.\n\nThe idea is to do as much updating as possible in the {pre|post}_update()\nmethods, since they are called when the application is not handling user input.\n\nThe context contains:\n\n:cairo: a CairoContext, this can be used to calculate the dimensions of text\n        for example\n\nNOTE: updating is done from the canvas, items should not update sub-items.\n\nAfter an update, the Item should be ready to be drawn.\n\nConstraint solving\n------------------\nA word about the constraint solver seems in place. It is one of the big\nfeatures of this library after all. The Solver is able to solve constraints.\nConstraints can be applied to items (Variables owned by the item actually).\nElement items, for example, uses constraints to maintain their recangular\nshape. Constraints can be created *between* items (for example a line that\nconnects to a box).\n\nConstraints that apply to one item are pretty straight forward, as all variables\nlive in the same coordinate system (of the item). The variables (in most cases\na Handle\'s x and y coordinate) can simply be put in a constraint.\n\nWhen two items are connected to each other and constraints are created, a\nproblem shows up: variables live in separate coordinate systems. To overcome\nthis problem a Projection (from solver.py) has been defined. With a Projection\ninstance, a variable can be "projected" on another coordinate system. In this\ncase, where two items are connecting to each other, the Canvas\' coordinate\nsystem is used.\n\n\nDrawing\n-------\nDrawing is done by the View. All items marked for redraw (e.i. the items\nthat had been updated) will be drawn in the order in which they reside in the\nCanvas (first root item, then it\'s children; second root item, etc.)\n\nThe view context passed to the Items draw() method has the following properties:\n\n:view:     the view we\'re drawing to\n:cairo:    the CairoContext to draw to\n:selected: True if the item is actually selected in the view\n:focused:  True if the item has the focus\n:hovered:  True if the mouse pointer if over the item. Only the top-most item\n           is marked as hovered.\n:dropzone: The item is marked as drop zone. This happens then an item is\n           dragged over the item and (if dropped) will become a child of\n           this item.\n:draw_all: True if everything drawable on the item should be drawn (e.g. when\n           calculating the bounding boxes).\n\nThe View automatically calculates the bounding box for the item, based on the\nitems drawn in the draw(context) function (this is only done when really\nnecessary, e.g. after an update of the item). The bounding box is in viewport\ncoordinates.\n\nThe actual drawing is done by Painters (painter.py). A series of Painters have\nbeen defined: one for handles, one for items, etc.\n\nTools\n-----\nBehaviour is added to the canvas(-view) by tools.\n\nTools can be chained together in order to provide more complex behaviour.\n\nTo make it easy a DefaultTool has been defined: a ToolChain instance with the\ntools added that are listed in the following sections.\n\nToolChain\n    The ToolChain does not do anything by itself. It delegates to a set of\n    tools and keeps track of which tool has grabbed the focus. This happens\n    most of the time when the uses presses a mouse button. The tool requests a\n    grab() and all upcoming events (e.g. motion or button release events) are\n    directly sent to the focused tool.\n\nHoverTool\n    A small and simple tool that does nothing more than making the item under\n    the mouse button the "hovered item". When such an item is drawn, its\n    context.hovered_item flag will be set to True.\n\nHandleTool\n    The HandleTool is used to deal with handles. Handles can be dragged around.\n    Clicking on a handle automatically makes the underlying item the focused\n    item.\n\nItemTool\n    The item tool takes care of selecting items and dragging items around.\n\nTextEditTool\n    This is a demo-tool, featuring a text-edit pop-up.\n\nRubberbandTool\n    The last tool in line is the rubber band tool. It\'s invoked when the mouse\n    button is pressed on a section of the view where no items or handles are\n    present. It allows the user to select items using a selection box\n    (rubber band).\n\n\nInteraction\n-----------\nInteraction with the canvas view (visual component) is handled by tools.\nAlthough the default tools do a fair amount of work, in most cases you\'ll\nsee that especially the way items connect with each other is not the way\nyou want it. That\'s okay. HandleTool provides some hooks (connect, disconnect\nand glue) to implement custom connection behaviour (in fact, the default\nimplementation doesn\'t do any connecting at all!).\n\nOne of the problems you\'ll face is what to do when an item is removed from the\ncanvas and there are other items (lines) connected to. This problem can be\novercome by providing a disconnect handler to the handle instance ones it is\nconnected. A callable object (e.g. function) can be assigned to the handle. It\nis called at the moment the item it\'s connected to is removed from the canvas.\n\n\nUndo\n====\n\nGaphas has a simple build-in system for registering changes in it\'s classes and\nnotifying the application. This code resides in state.py.\n\nThere is also a "reverter" framework in place. This "framework" is notified\nwhen objects change their state and will figure out the reverse operation that\nhas to be applied in order to undo the operation.\n\nSee state.txt and undo.txt for details and usage examples.\n\n\nGuidelines\n==========\n\nDocumentation should be in UK English.\n\nFollowing the `Python coding guidelines`_ indentation should be 4 spaces\n(no tabs), function and method names should be ``lowercase_with_underscore()``.\nWe\'re using two white lines as separator between methods, as it makes method\nboundries more clear.\n\n\n.. _Python coding guidelines: http://www.python.org/dev/peps/pep-0008/\n.. |Code style: black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/ambv/black\n.. |Build status| image:: https://travis-ci.com/gaphor/gaphas.svg?branch=master\n    :target: https://travis-ci.com/gaphor/gaphas\n.. |Coverage| image:: https://coveralls.io/repos/github/gaphor/gaphas/badge.svg?branch=master\n    :target: https://coveralls.io/github/gaphor/gaphas?branch=master\n',
    'author': 'Arjan J. Molenaar',
    'author_email': 'gaphor@gmail.com',
    'url': 'https://gaphas.readthedocs.io/',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
}


setup(**setup_kwargs)
