RELEASE Commands
================

python3 -m build

twine upload -r test_pygubu dist/*
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pygubu[all]==0.23.1

twine upload -r test_pygubu_designer dist/*
pip install --no-cache-dir -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pygubu-designer[all]
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ pygubu-designer

alejandroautalan/pygubu
alejandroautalan/pygubu-designer#99

pip install git+https://github.com/alejandroautalan/pygubu git+https://github.com/alejandroautalan/pygubu-designer


TODO
====
- BUG: create a pygubu dialog and generate code. Incorrect class hint generated
  self.mainwindow: pygubu.builder.widgets.dialog = builder.get_object(
            "settingsdialog", master)
- Issue: redraw previews on theme change.
- Customtkinter 5 Issues on designer:
  Can't select SegmentedButton in Preview (can't click it)
  Click on tabview tab does not select tab in treeview.
- Add a mechanism to test code generation.
- Treeview with scrollHelper. Srollbars are not shown depending on the
  treeview configuration or if columns are set stretch=true
  Investigate the behaviour.
- FIX: Create a frame frame1, create a frame2 inside, then add a button.
  Create another frame frame3 sibling of frame1, copy frame2 and paste in
  frame3, the content of frame 2 is duplicated in frame3.
- Add a tk.Spinbox, set from_:8  to:5  This show error on build, but
  howto validate this combination of properties?
- Allow to define custom font.
  This font can be defined selecting an specific font or can be defined
  based on a default TK font. For example I want TkTextFont but with size 60.
- Tcl 8.7 alpha adds new properties to widgets. Investigate that.
  For example, for tk.Toplevel: backgroundimage, tile
- ttk image property (label), allows to use more than one image? test in python first.
  Add proper editor for this.
- Do not rebuild entire preview for simple property changes
- On code generation, allow to select which tk_variables import in the class.
  See example in userinputapp.py.


My wish list?
============
- Add Json format and drop XML for UI files ?
- Add support to ttkbootstrap:
  In config panel:
    Create combobox selector for default theme engine (in this case ttkbootstrap)
    If ttkbootstrap is active show the diferent styles provided by ttkbootstrap
    in the style property for each widget. (Eg: primary.TButton
- Tooltips:
  We need to save a "manager" or something similar in the xml
  to later know howto process the property in pygubu.
  There is a "type" that is used already, see that way.
  OR
  Add tooltips as additional objects,
  Add suport for tkinter-tooltip?
- Add widgets from https://code.activestate.com/recipes/users/4189907/ ?
- Add tukkan support ?
- Add PDFviewer widget based on tkPDFView
- Add widget for CanvasPlus
- Add support to tkinterpp?
- ADD designer plugin with sun valley ttk theme ?
- Add button bar. Example: layout section with buttons that will modify
  a group of properties. Example button "Expand": for pack manager will set
  expand=True, fill=both.

- Add notebook, add tab,  add label to tab.
  Should be displayed on center, y no tab sticky option is set.
  Problem seems to be, the labels is ejecuting his layout configuration. Should not.
  Solution 1: add manager type "none" or "parent". If manager of widget is none, the
    parent widget is in charge of layout configuration.


Button Bar
==========

Section: New, Open, Save, Save As
Section: Cut, copy, paste, delete, UndoButtons?
Section: Align left, center, Align right, Expand # Buttons for Actions on current layout Manager
Section: Preview refresh
Section: Project Properties, Generate code

Example: Click Expand
  Manager Place: set expand=True, fill=both


Theming notes:
=============

resources
  - image (name, filename, format, data)
  - named font
  - OptionDatabaseGroup
    OptionDatabase (pattern, value, priority, type?(string, image, color, dimension))
  Theme:
    properties: name, parent
    children: list of styles
  Styles:
    ElementImage:
      properties: name, border, height, padding, sticky, width
    ElementVsapi: not supported
    DotStyle: the '.'
        properties: dynamic properties?
    WidgetStyle:
        parent: one of TButton, TEntry?


Style Editor
  configure
  map

Element Editor:
  configure
  imagespect

LayoutElement Editor (layoutspect)
  properties: elementname, side, sticky


The standard Tk <<Cut>>, <<Copy>>, <<Paste>>, and <<Clear>>

Increase version to sync with pypi.

tk 8.7
======

WIDGET STANDARD OPTIONS  http://www.tcl.tk/man/tcl8.7/TkCmd/options.htm

    -activebackground, activeBackground, Foreground
    -activeborderwidth, activeBorderWidth, BorderWidth
    -activeforeground, activeForeground, Background
    -activerelief, activeRelief, Relief
    -anchor, anchor, Anchor
    -background or -bg, background, Background
    -bitmap, bitmap, Bitmap
    -borderwidth or -bd, borderWidth, BorderWidth
    -cursor, cursor, Cursor
    -compound, compound, Compound
    -disabledforeground, disabledForeground, DisabledForeground
    -exportselection, exportSelection, ExportSelection
    -font, font, Font
    -foreground or -fg, foreground, Foreground
    -highlightbackground, highlightBackground, HighlightBackground
    -highlightcolor, highlightColor, HighlightColor
    -highlightthickness, highlightThickness, HighlightThickness
    -image, image, Image
    -insertbackground, insertBackground, Foreground
    -insertborderwidth, insertBorderWidth, BorderWidth
    -insertofftime, insertOffTime, OffTime
    -insertontime, insertOnTime, OnTime
    -insertwidth, insertWidth, InsertWidth
    -jump, jump, Jump
    -justify, justify, Justify
    -orient, orient, Orient
    -padx, padX, Pad
    -pady, padY, Pad
    -placeholder, placeHolder, PlaceHolder
    -placeholderforeground, placeholderForeground, PlaceholderForeground
    -relief, relief, Relief
    -repeatdelay, repeatDelay, RepeatDelay
    -repeatinterval, repeatInterval, RepeatInterval
    -selectbackground, selectBackground, Foreground
    -selectborderwidth, selectBorderWidth, BorderWidth
    -selectforeground, selectForeground, Background
    -setgrid, setGrid, SetGrid
    -takefocus, takeFocus, TakeFocus
    -text, text, Text
    -textvariable, textVariable, Variable
    -troughcolor, troughColor, Background
    -underline, underline, Underline
    -wraplength, wrapLength, WrapLength
    -xscrollcommand, xScrollCommand, ScrollCommand
    -yscrollcommand, yScrollCommand, ScrollCommand


Default ttk theme on linux
==========================

.Xresources

*TkTheme: default


Load: xrdb -merge ~/.Xresources
Show: xrdb -query -all


DND
===

pip3 install python-tkdnd
