Closed nkh closed 1 year ago
@nkh give me some time, let me think
@qindapao I can take this one
@nkh
ok, After you finish, I will test and find bugs :)
4f94987 the refactoring of the context menus in the right objects, let's try to not put everything together in the future.
Not all the elements have the same set of characters so I'll just handle ASCII and base Unicode.
I also merged a better Git mode, more specialized and easier to use I believe, changing the connector and arrow can be done outside the git modem, and inside. I updated the docs.
I'll finish this ticket soon.
@nkh
This is a big change. Let's spend more time checking it. Recently, I still have too little time to help too much.
My next step is the detailed installation instruction of cygwin environment, starting on Wednesday.
Let me explain it so you don't have to spend time in the diff.
Before the change everything was in Actions::Box (I simplify) now the popup menu entries have been moves around to their respective modules.
lib/App/Asciio/Actions/Arrow.pm
lib/App/Asciio/Actions/Asciio.pm
lib/App/Asciio/Actions/Box.pm
lib/App/Asciio/Actions/Git.pm
lib/App/Asciio/Actions/Multiwirl.pm
lib/App/Asciio/Actions/Ruler.pm
the types definitions (the characters) were moved new modules to keep the data from the code, The cloning function is made part of the module (note that they are not in the Asciio package) because they are used from different places. You should look at those two files, most of what is in there you wrote.
/home/nadim/nadim/devel/repositories/perl_modules/P5-App-Asciio/lib/App/Asciio/Arrows.pm
/home/nadim/nadim/devel/repositories/perl_modules/P5-App-Asciio/lib/App/Asciio/Boxes.pm
@nkh
Ok, I'll try it on the company computer tomorrow.
8a8d11e
ADDED: make selection ASCII/Unicode
ADDED: bindings to make selection ASCII/Unicode
FIXED: keyboard handling for capturing groups
CHANGED: Insert group bindings
@qindapao please note that I changed some of the bindings you defined in the "insert" group; specially those to insert rombus, ellipse, and lines, I notice that there's no bindings for triangles.
'Add box' => ['000-b', \&App::Asciio::Actions::Elements::add_element, ['Asciio/box', 0] ],
'Add unicode box' => ['0A0-b', \&App::Asciio::Actions::Elements::add_element, ['Asciio/box unicode', 0] ],
'Add shrink box' => ['00S-B', \&App::Asciio::Actions::Elements::add_element, ['Asciio/shrink_box', 1] ],
'Add text' => ['000-t', \&App::Asciio::Actions::Elements::add_element, ['Asciio/text', 1] ],
'Add arrow' => ['000-a', \&App::Asciio::Actions::Elements::add_element, ['Asciio/wirl_arrow', 0] ],
'Add unicode arrow' => ['0A0-a', \&App::Asciio::Actions::Elements::add_element, ['Asciio/wirl_arrow unicode', 0] ],
'Add angled arrow' => ['00S-A', \&App::Asciio::Actions::Elements::add_element, ['Asciio/angled arrow', 0] ],
'Add unicode angled arrow' => ['0AS-A', \&App::Asciio::Actions::Elements::add_element, ['Asciio/angled arrow unicode', 0] ],
'Add connector' => ['000-c', \&App::Asciio::Actions::Elements::add_element, ['Asciio/connector', 0] ],
'Add connector type 2' => ['00S-C', \&App::Asciio::Actions::Elements::add_element, ['Asciio/connector2', 0] ],
'Add if' => ['000-i', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/if', 1] ],
'Add process' => ['000-p', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/process', 1] ],
'Add rhombus' => ['000-r', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Shape/rhombus', 0] ],
'Add ellipse' => ['000-e', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Shape/ellipse', 0] ],
'Add ascii line' => ['000-l', \&App::Asciio::Actions::Elements::create_line, 0 ],
'Add unicode line' => ['00S-L', \&App::Asciio::Actions::Elements::create_line, 1 ],
'Add unicode bold line' => ['0A0-l', \&App::Asciio::Actions::Elements::create_line, 2 ],
'Add unicode double line' => ['0AS-L', \&App::Asciio::Actions::Elements::create_line, 3 ],
'Add multiple texts' => ['C00-t', \&App::Asciio::Actions::Unsorted::insert_multiple_boxes_from_text_description, 0 ],
'Add multiple boxes' => ['C00-b', \&App::Asciio::Actions::Unsorted::insert_multiple_boxes_from_text_description, 1 ],
'Add exec box' => ['C00-e', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/exec', 1] ],
'Add exec box verbatim' => ['C00-v', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/exec verbatim', 1] ],
'Add exec box verbatim once' => ['C00-o', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/exec verbatim once', 1] ],
'Add line numbered box' => ['C00-l', \&App::Asciio::Actions::Elements::add_element, ['Asciio/Boxes/exec add lines', 1] ],
'Add vertical ruler' => ['C00-r', \&App::Asciio::Actions::Ruler::add_ruler, {TYPE => 'VERTICAL'} ],
'Add horizontal ruler' => ['C0S-R', \&App::Asciio::Actions::Ruler::add_ruler, {TYPE => 'HORIZONTAL'} ],
'Add help box' => ['C00-h', \&App::Asciio::Actions::Elements::add_help_box, ],
if 3 boxes and 2 arrow need to be unicode, we need to run 5 changes, select all 5 and run just once
we need to see that the popup menu get's cleaned a bit