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
====
- Issue: redraw previews on theme change.
- ttkstyles branch: add optiondb_initializer=None to builder and codebuilder.
  or name it on_first_widget_cb. Function that will execute only once after
  the first widget is created, generally the root widget.
- 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.
  F5 preview of CTk does not show images and shows warning when the
  preview closes. This is because Ctk is another tk instance running on
  another thread.
- 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.



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

New Project, Open Project, Save, UndoButtons, Cut, copy, paste, delete,
Generate code (generate files in disk, with configured names),
Buttons for Actions on current layout Manager:
  Align left, center, Align right, Expand.
  
Example: Click Expand
  Manager Place: set expand=True, fill=both




Project Notes:
=============

Posible project properties:

name: Project Name
path: Path to save generated files? Defaults to . (dot), same path as project.
relative_path: use relative path for external files (eg image files)




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
