New version of ProjMan

master
svkalinin 2022-07-21 10:56:46 +03:00
parent faf594ce9b
commit e68aeddbd5
2595 changed files with 14193 additions and 12688 deletions

33
BUGS
View File

@ -1,33 +0,0 @@
######################################################
# Tcl/Tk project Manager
# Distributed under GNU Public License
# Author: Sergey Kalinin banzaj28@yandex.ru
# Copyright (c) "Sergey Kalinin", 2002, http://nuk-svk.ru
######################################################
- Файл проекта, убрать расширение
- Глюки подсветки
* Изменение размера шрифтов для редактора вступает в силу только после
перезагрузки, что не очень-то удобно.
* При запуске приходится делать лишнее усилие по открытию root
элемента в TreeView. Сделай это по умолчанию автоматом, плиз. И чтобы
это также работало при команде refresh.
* При вводе текста если ввести proc, то твой редактор подставит
автоматом скобки. Вообще-то это не очень правильно, к примеру я
ставлю после функции комментарий вида } ;# proc testFunct
И вот тут он вставляет не нужные мне сейчас ковычки. По идеи надо в
balloon окне показать формат этой команды (также для все остальных).
Посмотри как это сделано в VisualBasic версии > 4. А так есть еще
один баг. Если у меня перед командой proc стоят пробелы, то точно
такое же их количество должно стоять и после последней закрывающей
скобкой иначе все форматирование едит и надо править ручками.
- При установки переменной editor(wrap) значения none на длинных строках при появлениии нижнего скролбара наблюдается глюк пока не объяснимый :(
Скрол бар начинает мерцать (то появиться то исчезнет)

482
CHANGELOG
View File

@ -1,449 +1,33 @@
##########################################################
# Tcl/Tk Project Manager
# Distributed under GNU Public License
# Copyright (c) "Sergey Kalinin", 2001, http://nuk-svk.ru
# Author: Sergey Kalinin banzaj28@yandex.ru
##########################################################
0.4.6
25.05.2022
- Added linux shell highlight
- Added "Close" button into file tab
0.4.5
15.03.2018
- Added sort procedure for projects tree
13.03.2018
- Added small toolbar into project tree
12.03.2018
- Added insert base64 encoded image into source code (press "Control+I" or popup menu)
06.03.2018
- Added procedure arguments into tree
- Change read config procedure (error fixed)
- Fixed error when project running
- Added new Menu button into tollbar and Hide/Show options into config
05.03.2018
- Fixed "Add new file" toolbar button press
- Fixed "Control+S" hotkey error
02.03.2018
- GoToNumber entry replace
24.02.2018
- Fixed Add to project procedure
- Fixed hot key Cntrl+S saved prosedure when saved opened file from File Browser
- Refactoring all Tree procedures
- Added GoTo line into toolbar
- Fixed fileinfo update when tree one click
- Fixed bug with opened files have extention is a upper case
22.02.2018
- Refactoring Settigs procedure source code
- Some changes into messages files (localisation)
- Fixed AddToProj procedure for file browser tree
- Disable OpComplite procedure
20.02.2018
- Refactoring auto update file structure (tree). Now structure updated when file was saving
- Refactoring "Settings" dialog
- Fix saving "Show dot files" option
- Fixed correctly highlightning procedure names
19.02.2018
- Fix "New file" ctrl+n hotkey
18.02.2018
- Fixed edit files into root node from file browser tree
- Change "Delete project" dialog and procedure
17.02.2018
- Refactoring "Add New Projects" "Project Settings" (e.t.c.) dialogs
- Added "Add as new project" dialog for file browser
- Add popup menu for file browser
- Fixed some highlight bug
14.02.2018
- Added saving main window geometry into projman.conf file when close programm
- Fixed AutoComplite precedure for TCL/TK-projects
- Added colored icon for main window
- Fixed "Close all" procedure if opened files from projects and file browser
- Fixed parsing some procedure name like ::proc::name or proc_na::me(aa) and parameters {{} {} {}}
- Added opening last active project when project run
- Fixed Windows OS running without installation
13.02.2018
- Added gray theme
- Fixed work with file from directory (FileBrowser function).
08.02.2018
- Auto indent added for () [] braces
- File Browser added. Now we will edited any file without project
07.02.2018
- Tcl, Perl, PHP highlight comment procedure fixed
- Help file Text.html utf-8 encoding
- Change hotkeys "Control+," "Control+." "Control+/" (commect selected, uncoment selected, select all)
- Add new function Comments/Uncomment selected text
05.02.2018
- Added binding mouse button: click on notebook tab highlight opened file name in tree
- Change "Paste from Clipboard" function
- Change popup editor menu (undo, redo, copy, paste, cut functions)
- Change Logo and About dialog
- Russian help files was conerting into utf-8 encode
- Change help file load procedure
04.02.2018
- Fixed paste text highlight
- Fixed setting edited flag when paste the text from buffer
22/01/2018
- Remove ctags support
- Added gitk (gui for git) support
11/01/2018
- Changes color setting dialog into "Setting"
- Actualizing information into "About" dialog
- Corrected color settings for all widgets
- Change default color scheme
- Remove ctag, change autocomplitt procedure
0.4.4
19/10/2015
- Fixed install.tcl script
0.3.7
18/10/2007
-Added text encoding support from koi8-r,cpp1251,cp866 to UTF-8
20/02/2007
- Fixed settings dialog
- Fixed saved settings parameter
27/01/2006
- Remove SuperText widget now use native TEXT
29/12/2005
- Added RUBY projects support
- Fixed remove project if some files is open in editor
- Add function for added interpritator into new like #!/usr/bin/wish
0.3.6
18/02/2005
- Fixed correctly file attributes in WIN OS as like a date and time
01/02/2005
- Added DOT-file support
07/12/2004
- Added PHP projects support
0.3.5
01/11/2004
- Added Rivet and TclHttpd template files support
- Removed BWidget documentation
- Fixed bug with One Click mouse button on folder in TreeWidget
25/10/2004
Fixed bug with PageRise function
27/09/2004
- Added "Create New Directory" dialog into main and pop-up menu
14/09/2004
- Added image viewer
- Fixed close projman if was not opened projects
0.3.4
15/07/2004
- Fixed closes "About" window with popup menu
13/04/2004
- Added O'Caml (ML) support (not stable)
- Fixed settings dialog
0.3.3
04/12/2003
- Fix perl source code navigation ('sub' keyword)
22/09/2003
- Added fortran project support
- Added STDERR output in text widget when project or file compile (running)
10/07/2003
- Fix buf with runing TkCVS and other modules
07/07/2003
- Added PERL project support
- Added "Control+ PageUp" and "Control+ PageDown" key switching editors tabs
- Added popupmenus for tabs
0.3.2
20/12/2002
- Fixed "Open project" from any directoryes, now files don't copying into default projects dir
- Fixed "Delete project" procedure
- Change work dir in windows - now .projman
- Small change install dialog
15/12/2002
- Fixed error with delete file
06/12/2002
- Fixed error with comments highlight in JAVA-source
0.3.1
20/11/2002
- Added comand line option in compiler string (for projects)
- Fixed file compile procedure
- Fixed add (create new) file to project procedure. Now file created in any location.
05/11/2002
- Fixed error with run project on press F9 key
- Fixed error with different project location
- Fixed "Select All" procedure
- Small bugs fixes in projects.tcl
- Code cleaning
- Fixed Save/Close editing file
0.3.0
28/10/2002
- Correct main menus and popup-menus ("file" and "projects" menus)
25/10/2002
- Fixed settings dialog - now full working :)
- Added JAVA files and project compiling
14/10/2002
- Remove editor.conf, now all setting placement in projman.conf need replace old ~/.projman/projman.conf file
- Fixed "Settings dialog"
16/09/2002
- Changed TCL highlight procedure
10/09/2002
- Added JAVA project support like source code highlightning, project managment, class navigation
0.2.5
02/09/2002
- New release VisualRegexp added (thanks Laurent Riesterer)
17/06/2002
- Bug in Help procedure (<pre></pre> tag) fixed (by Alexander Danilov)
0.2.4
11/06/2002
- Fixed copying french documentation files
- Now interface language setting on $env(LANG) variable (system lacale) and HOMEPATH HOMEDRIVE vars (for windows)
- Change Procedure Complitition proc
- Change load modules procedure
05/06/2002
- Change tcl highlight procedure for braces and options (by Korwin)
03/06/2002
- Small GUI changes (Tree view, AboutBox)(by Alexander Danilov)
- Fixed help files path in install.tcl (by Alexander Danilov)
- Added "Close" button into toolbar
- Change Settins dialog (now self window) - DON'T WORKING developers only
- Code clean (procedure.tcl)
- Changes NoteBook title (save/modify file veiew)
0.2.3
30/05/2002
- Added icon for XML files
- Added XML highlightning (used highlight/html.tcl)
- Added "Select All" command into "Edit" menu
- Fixed "Overwrite/Insert" procedure
- Fixed On/Off toolbar
21/05/2002
- Rewrite all TCL and TK docs by Alexander Danilov <daapp@land.ru>
0.2.2
17/05/2002
- Fixed calling external modules procedure
0.2.1
14/05/2002
- Fixed location help files
- Added menu support into spec
15/04/2002
- Changes highlight procedure - now all highlight files puts into /highlight directory and loaded automaticaly and now creation new highlight module so easy...
- Added TeX highlightning
09/04/2002
- Added french localisation and Tcl help by Michel SALVAGNIAC
01/04/2002
- Added german localisation by Roman Schaller <r.schaller@gmx.ch>
0.2.0 (26/03/2002)
- Added Close opened file procedure when Delete file
- Fix calling Ctags module if ctags package not installed
- Added paned windows (for changes Tree size)
22/03/2002
- Autocomplitition procedure (by Alexander Dederer (aka Korwin))
- Added procedure names and parameters complitition
- Changed Create New File dialog
- Fixed directory setings and created into Windows
- Added CTags support (*nix only)
- Fixed error with Pop-Up menu
- Added Edit pop-up menu into editor window
- Small fix with some keys binding
- Small fix with quit ProjMan and saved modifing files
0.1.5 (01/03/2002)
- Fix autoindent text procedure
- Include updated ducumenation (by Alex Danilov)
0.1.4 (20/02/2002)
- Fix some problem with Close/Open file
- Added bracket highlightning and corsor jumping for bracket!!! (by Korwin)
07/02/2002
- Added refresh Tree procedure and ToolBar On/Off procedure
- Some changes menu structure
05/02/2002
- Changed GUI for installiation dialog
- Added english ProjMan user manual
04/02/2002
- Changes documentation structure, now documentation split by chapters and languages
- Changes Help procedure for working with new directory structure
- Include new Tcl documentation by Alexander Danilov
- Changes installiation procedure - added select Documentation language for install
- Fixed problem with encoding russian documentation in Windows OS
- Fixed problem with names like "proc::name" into Help system
- Added Tcl/Tk and BWidget english documentation
0.1.3 (31/01/2002)
- Replase SelectDir on standart dialog tk_chooseDirectory
- Fixed error into TkDIFF+ with convert date procedure
- Added find history in Find dialog, and now used F3 for repeat searching
- Fixed hot keys bindings into Find (F3, Enter) and Replace (F4, Enter) dialogs
- Fixed changing "File modify" flag after successfully replaceing
0.1.2 (29/01/2002)
- Fix error with "Close all" procedure if raised About (Debug, Settings e.t.c.) dialog
- Translate TODO on English
24/01/2002
- Added mouse wheel support on Tree widget (by Korwin)
- Added "editor.conf" for change editor preferences and source highlightning colors
0.1.1 (23/01/2002)
- Fix correct cursor position viewed
- Added highlightning comments like ";#" (by Korwin)
22/01/2002
- Added raised notebook tab when click mouse on opened file name
- Fix correct windows path to tcl interpritator into Project Setting dialog
- Added TkREGEXP module (aka VisualREGEXP) from Laurent Riesterer
- Added new diff'ing module TkDIFF+ (with compare dirrectoryes) from Laurent Riesterer
- Added TkREGEXP and TkDIFF+ documentation
19/01/2002
- Fix callback links procedure into help system (thanks Dederer)
0.1.0 (17/01/2002)
- Added graphical installiation
- Corrected path for work in windows
16/01/2002
- Fix error with create and select directory into install.tcl
- Some Windows bugs fix
- Add invoke tkDiff for one or two selected files
- Add saved all files before run project
0.0.19 (15/01/2002)
- Add "Select Directory" procedure into settings page
- Add "Open project" procedure for adding existing project
- Add invoke TkCVS for Active project
- Fix error with open files with names like "some.file.name"
- Code cleaning
14/01/2001
- Add close window procedure into "Settings" and "Project Settings" dialog
after pushed "Save" button
0.0.17 (11/01/2002)
- Fix error with "New file" in new project procedure
- Fix small errors
10/01/2002
- Replaced hotkey "Ctrl-T" with "Ctrl-M". And now "Control-T" reverses the order of the two
characters to the right of the insertion cursor.
- Fix small bug
09/01/2002
- Added "Interface Language" select procedure into "Settings" dialog
- Fix error with close opening and modifing file procedure
- Fix read procedure with names "Proc::Name" and "Proc_name"
- Fix Insert/Overwrite editor mode
08/01/2002
- Fix error in notebook with mouse button click
- Changes mouse click procedure in Tree widget
07/01/2002
- Added "Print file" command
- Added "Print Selected text" command
- Fix error with "Save Setting" procedure (CheckBox verify)
- Fix error with "Find dialog" "Replace dialog", e.t.c. if no files opened
- Added "Editor font" option
04/01/2002
- Fixed many small bugs
- Fix error with Ctrl+T keys
- Fix error with "Save As" procedure
03/01/2002
- Added THANKS file, and view this into About window
- Fix problem with execute external browser from About window
- Fix create new text file in "Add To Project" dialog
- Fix some errors in MakeRPM procedure, but not working yet :(
- Fix error with select active project after creating new project
- Fix small error with delete project procedure
- Fix uncorrect cursor position counter into editor
######################################################
# Tcl/Tk Project manager 2.0
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svl.ru
# Home page: https://nuk-svk.ru
######################################################
20/06/2022
- Beginning the project
13/07/2022
- Added open file dialog
- Added open folder dialog
- Added save file function
- Added a command line argument support (open file(s) or folder(s))
- Added TCL and BASH highlite
- Added a configuration file (progman.ini) and a procedure for reading/saving them
14/07/2022
- Added On/Off viewing toolbar
- Added On/Off viewing line numbers bar
- Added a Comment/Uncomment text support
- Added text auto format
15/07/2022
- Added a close file (tab) function with Ctrl+w
- Added a insert/remove the tabspace
- Fixed comment/uncomment selected text
20/07/2022
- Fixed indent text
- Fixed insert " and '
- Added a main window geometry option into config, and autosave current geometry

347
COPYING
View File

@ -1,341 +1,6 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
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 2 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, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
######################################################
# Tcl/Tk Project manager 2.0
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svl.ru
# Home page: https://nuk-svk.ru
######################################################

18
INSTALL
View File

@ -1,12 +1,6 @@
#########################################################
# Tcl/Tk Project Manager
# Copyright (c) "Sergey Kalinin", 2001, http://nuk-svk.ru
# Author: Sergey Kalinin banzaj28@yandex.ru
#########################################################
1. Install Tcl/Tk, BWidget first
3. Run install.tcl script for copying files, or use RedHat Package Manager
3. Type from the command line 'projman' and enjoy
######################################################
# Tcl/Tk Project manager 2.0
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svl.ru
# Home page: https://nuk-svk.ru
######################################################

12
KNOWBUG
View File

@ -1,12 +0,0 @@
######################################################
# Tcl/Tk Project Manager
# Distributed under GNU Public License
# Author: Sergey Kalinin banzaj28@yandex.ru
# Copyright (c) "https://nuk-svk.ru", 2018, https://bitbucket.org/svk28/projman
######################################################
1. BaseALT SimplyLinux - Bwidget ScrolledWindow dont work with options:
-background
In Debian - it's all right

219
LICENSE 100644
View File

@ -0,0 +1,219 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.
“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.
To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.
A “covered work” means either the unmodified Program or a work based on the Program.
To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.
A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.
A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.
You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <https://www.gnu.org/licenses/why-not-lgpl.html>.

52
README
View File

@ -1,52 +0,0 @@
######################################################
# Tcl/Tk Project Manager #
# Distributed under GPL #
# Author: Sergey Kalinin, http://nuk-svk.ru #
######################################################
ABOUT
Tcl/Tk Project Manager is a full IDE for programming in TCL/Tk.
It includes a project and file manager, a source editor with
syntax highlighting and procedure navigation, a context-sensitive
help system, and much more.
Working an Unix (Linux tested) and Windows.
![ProjMman 0.4.6](https://nuk-svk.ru/wp-content/uploads/2018/02/projman_0.4.5_small.png "ProjMan 0.4.6")
INSTALLATION
See INSTALL
REQUIREMENTS
For UNIX-like OS
Tcl/Tk >= 8.6 http://tcl.tk
BWidget http://sourceforge.net/projects/tcllib
tcl-img - for image viewer
For WINDOWS
ActiveTcl http://tcl.activestate.com
CREDITS
Sergey Kalinin - main project programmer and coordinator
banzaj28@gmail.com
http://nuk-svk.ru
Laurent Riesterer - VisualREGEXP and TkDIFF+ parts
laurent.riesterer@free.fr
http://laurent.riesterer.free.fr
Alexander Danilov - rewrite all documentation
daapp@chat.ru
Alexandr Dederer (aka Korwin) - many features and bugs fixed
dederer-a@mail.ru

View File

@ -1,52 +1,6 @@
######################################################
# Tcl/Tk Project Manager #
# Distributed under GPL #
# Author: Sergey Kalinin, http://nuk-svk.ru #
# Tcl/Tk Project manager 2.0
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svl.ru
# Home page: https://nuk-svk.ru
######################################################
ABOUT
Tcl/Tk Project Manager is a full IDE for programming in TCL/Tk.
It includes a project and file manager, a source editor with
syntax highlighting and procedure navigation, a context-sensitive
help system, and much more.
Working an Unix (Linux tested) and Windows.
![ProjMman 0.4.5](https://nuk-svk.ru/wp-content/uploads/2018/02/projman_0.4.5_small.png "ProjMan 0.4.5")
INSTALLATION
See INSTALL
REQUIREMENTS
For UNIX-like OS
Tcl/Tk >= 8.6 http://tcl.tk
BWidget http://sourceforge.net/projects/tcllib
tcl-img - for image viewer
For WINDOWS
ActiveTcl http://tcl.activestate.com
CREDITS
Sergey Kalinin - main project programmer and coordinator
banzaj28@gmail.com
http://nuk-svk.ru
Laurent Riesterer - VisualREGEXP and TkDIFF+ parts
laurent.riesterer@free.fr
http://laurent.riesterer.free.fr
Alexander Danilov - rewrite all documentation
daapp@chat.ru
Alexandr Dederer (aka Korwin) - many features and bugs fixed
dederer-a@mail.ru

11
THANKS
View File

@ -1,11 +0,0 @@
Alexander Danilov, daapp@chat.ru (documentation rewrite)
Laurent Riesterer, laurent.riesterer@free.fr, http://laurent.riesterer.free.fr (VisualRegexp module)
Alexander Dederer (aka Korwin) dederer-a@mail.ru (many features and bugs fixed)
Igor Didkovsky, ididkovsky@mail.ru, http://langos.lrn.ru/ (programm tester)
Oleg S. Gints (pogramm tester)
Victor Wagner (aka Vitus), http://www.ice.ru/~vitus
Serg Oskin, http://oskin.msk.ru/
DataX/FLORIN Inc. http://www.florin.ru (documentation)
Peter Campbell, http://fastbase.co.nz/edit (ML-editor)
Alexey Kakunin, http://kakunin.chat.ru/ (TCL Developer Studio)

8
TODO
View File

@ -0,0 +1,8 @@
######################################################
# Tcl/Tk Project manager 2.0
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svl.ru
# Home page: https://nuk-svk.ru
######################################################
2. Подстветку текущей вкладки и элемента в дереве

View File

@ -1,14 +0,0 @@
# This is a sample build configuration for Other.
# Check our guides at https://confluence.atlassian.com/x/5Q4SMw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
#image: efrecon/tcl
image: appropriate/curl
pipelines:
default:
- step:
script:
- tar -czvf projman-latest.tgz *
- curl ftp://nuk-svk.ru --user $FTP_USER:$FTP_PASS --upload-file projman-latest.tgz

View File

@ -1,2 +0,0 @@
Sergey Kalinin

View File

@ -0,0 +1,19 @@
./projman
./lib/config.tcl
./lib/editor.tcl
./lib/files.tcl
./lib/gui.tcl
./lib/highlight.tcl
./lib/image_library.tcl
./lib/menu.tcl
./lib/notebook.tcl
./lib/procedure.tcl
./lib/tree.tcl
./lib/msgs/de.msg
./lib/msgs/en.msg
./lib/msgs/fr.msg
./lib/msgs/ru.msg
./theme
./README.md
./debian/projman.desktop
./projman-48.png

View File

@ -0,0 +1,3 @@
./README.md
./CHANGELOG
./TODO

20
debian/build-deb.sh vendored 100644
View File

@ -0,0 +1,20 @@
#!/bin/bash
cd projman_2
VERSION=$(grep Version projman.tcl | grep -oE '\b[0-9]{1,2}\.[0-9]{1,2}\.[0-9]{1,2}\b')
RELEASE=$(grep Release projman.tcl | grep -oE '\b[0-9A-Za-z]{1,3}\b')
mv projman.tcl projman
sed -i "s+^set\ dir(lib)+set\ dir(lib)\ /usr/share/projman/lib ;#+g" projman
sed -i "s+\[pwd\]+/usr/share/projman+g" projman
tar czf ../projman_${VERSION}.orig.tar.gz .
dpkg-buildpackage
#cp ../projman_${VERSION}-${RELEASE}_amd64.deb /files/
mv projman projman.tcl

5
debian/changelog vendored 100644
View File

@ -0,0 +1,5 @@
projman (2.0.0-alpha) stable; urgency=medium
* Initial release
-- Sergey Kalinin <svk@nuk-svk.ru> Wed, 20 Jul 2022 16:56:31 +0300

1
debian/compat vendored 100644
View File

@ -0,0 +1 @@
8

14
debian/control vendored 100644
View File

@ -0,0 +1,14 @@
Source: projman
Section: Develop
Priority: optional
Maintainer: Sergey Kalinin svk@nuk-svk.ru
Build-Depends: debhelper
Standards-Version: 3.9.6
Homepage: https://nuk-svk.ru
Vcs-Git: https://git.nuk-svk.ru/projman.git
Package: projman
Architecture: any
Depends: tcl(>=8.6), tk(>=8.6), tcllib, tklib ${misc:Depends}
Description: Projman is a yet another editor

15
debian/copyright vendored 100644
View File

@ -0,0 +1,15 @@
Projman is a yet another editor
Copyright: GPL
Information from the binary package:
Name : projman Relocations: (not relocatable)
Version : 1.0.3 Vendor: SVK
Release : 1 Build Date: Пн 17 сен 2018 11:49:36
Install date: (not installed) Build Host: alt-ws.localdomain
Group : System
Size : License: GPL
URL : https://bitbucket.org/svk28/rac-gui
Summary : Projman is a yet another editor
Description :
Projman is a yet another editor

5
debian/dirs vendored 100644
View File

@ -0,0 +1,5 @@
usr/bin
usr/share
usr/share/projman
usr/share/projman/lib
usr/share/projman/lib/msgs

4
debian/docs vendored 100644
View File

@ -0,0 +1,4 @@
README.md
CHANGELOG
TODO

2
debian/files vendored 100644
View File

@ -0,0 +1,2 @@
projman_2.0.0-alpha_amd64.buildinfo Develop optional
projman_2.0.0-alpha_amd64.deb Develop optional

7
debian/install vendored 100644
View File

@ -0,0 +1,7 @@
projman /usr/bin/
lib/*.tcl /usr/share/projman/lib
lib/msgs/* /usr/share/projman/lib/msgs
theme /usr/share/projman/
README.md /usr/share/doc/projman
debian/projman.desktop /usr/share/applications
projman-48.png /usr/share/pixmaps

6
debian/postinst vendored 100755
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Install the desktop entry
if hash update-desktop-database 2>/dev/null; then
update-desktop-database
fi

86
debian/projman.debhelper.log vendored 100644
View File

@ -0,0 +1,86 @@
dh_prep
dh_installdirs
dh_prep
dh_installdirs
dh_prep
dh_installdirs
dh_install
dh_prep
dh_installdirs
dh_install
dh_prep
dh_installdirs
dh_prep
dh_installdirs
dh_prep
dh_installdirs
dh_install
dh_installdocs
dh_installchangelogs
dh_compress
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dh_prep
dh_installdirs
dh_install
dh_installdocs
dh_installchangelogs
dh_compress
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dh_prep
dh_installdirs
dh_install
dh_installdocs
dh_installchangelogs
dh_compress
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dh_prep
dh_installdirs
dh_install
dh_installdocs
dh_installchangelogs
dh_compress
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dh_prep
dh_installdirs
dh_install
dh_installdocs
dh_installchangelogs
dh_compress
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
dh_prep
dh_installdirs
dh_install
dh_installdocs
dh_installchangelogs
dh_compress
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb

11
debian/projman.desktop vendored 100644
View File

@ -0,0 +1,11 @@
[Desktop Entry]
Name=ProjMan
GenericName=Text Editor
Comment=A source editor with syntax highlighting and procedure navigation, a context-sensitive help system, and much more.
Exec=projman %F
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Categories=Development;TextEditor;
Icon=projman-48

2
debian/projman.substvars vendored 100644
View File

@ -0,0 +1,2 @@
misc:Depends=
misc:Pre-Depends=

10
debian/projman/DEBIAN/control vendored 100644
View File

@ -0,0 +1,10 @@
Package: projman
Version: 2.0.0-alpha
Architecture: amd64
Maintainer: Sergey Kalinin svk@nuk-svk.ru
Installed-Size: 1563
Depends: tcl (>= 8.6), tk (>= 8.6), tcllib, tklib
Section: Develop
Priority: optional
Homepage: https://nuk-svk.ru
Description: Projman is a yet another editor

1188
debian/projman/DEBIAN/md5sums vendored 100644

File diff suppressed because it is too large Load Diff

113
debian/projman/usr/bin/projman vendored 100755
View File

@ -0,0 +1,113 @@
#!/bin/sh
# Tcl ignores the next line -*- tcl -*- \
exec wish "$0" -- "$@"
######################################################
# Tcl/Tk Project manager 2.0
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svl.ru
# Home page: https://nuk-svk.ru
######################################################
# Version: 2.0.0
# Release: alpha
######################################################
# определим текущую версию и релиз
set f [open [info script] "RDONLY"]
while {[gets $f line] >=0} {
if [regexp -nocase -all -- {version:\s+([0-9]+?.[0-9]+?.[0-9]+?)} $line match v1] {
set projmanVersion $v1
}
if [regexp -nocase -all -- {release:\s+([a-z0-9]+?)} $line match v1] {
set projmanRelease $v1
}
}
close $f
puts "Projman version $projmanVersion-$projmanRelease"
if { $::argc > 0 } {
foreach arg $::argv {
lappend opened $arg
}
puts $opened
}
package require msgcat
package require inifile
package require ctext
# Устанавливаем текущий каталог
set dir(root) /usr/share/projman
set dir(doc) [file join $dir(root) doc]
# Устанавливаем рабочий каталог, если его нет то создаём.
# Согласно спецификации XDG проверяем наличие переменных и каталогов
if [info exists env(XDG_CONFIG_HOME)] {
set dir(cfg) [file join $env(XDG_CONFIG_HOME) projman]
} elseif [file exists [file join $env(HOME) .config]] {
set dir(cfg) [file join $env(HOME) .config projman]
} else {
set dir(cfg) [file join $env(HOME) .projman]
}
if {[file exists $dir(cfg)] == 0} {
file mkdir $dir(cfg)
}
puts "Config dir is $dir(cfg)"
# каталог с модулями
set dir(lib) /usr/share/projman/lib ;# /usr/share/projman/lib ;# /usr/share/projman/lib ;# /usr/share/projman/lib ;# /usr/share/projman/lib ;# /usr/share/projman/lib ;# /usr/share/projman/lib ;# /usr/share/projman/lib ;# /usr/share/projman/lib ;# /usr/share/projman/lib ;# /usr/share/projman/lib ;# /usr/share/projman/lib ;# /usr/share/projman/lib ;# "[file join $dir(root) lib]"
source [file join $dir(lib) config.tcl]
foreach modFile [lsort [glob -nocomplain [file join $dir(lib) *.tcl]]] {
if {[file tail $modFile] ne "gui.tcl" && [file tail $modFile] ne "config.tcl"} {
source $modFile
puts "Loading module $modFile"
}
}
# TTK Theme loading
set dir(theme) "[file join $dir(root) theme]"
foreach modFile [lsort [glob -nocomplain [file join $dir(theme) *]]] {
if [file isdirectory $modFile] {
source $modFile/[file tail $modFile].tcl
puts "Loading theme $modFile.tcl"
} elseif {[file extension $modFile] eq ".tcl"} {
source $modFile
puts "Loading theme $modFile"
}
}
# загружаем пользовательский конфиг, если он отсутствует, то копируем дефолтный
if {[file exists [file join $dir(cfg) projman.ini]] ==0} {
Config::create $dir(cfg)
}
Config::read $dir(cfg)
::msgcat::mclocale $cfgVariables(locale)
if [::msgcat::mcload [file join $dir(lib) msgs]] {
puts "Load locale messages... OK"
}
puts "Setting the locale... [::msgcat::mclocale]"
source [file join $dir(lib) gui.tcl]
# Open the PATH if command line argument has been setting
if [info exists opened] {
puts $opened
foreach path $opened {
if [file isdirectory $path] {
FileOper::ReadFolder $path
} elseif [file exists $path] {
ResetModifiedFlag [FileOper::Edit $path]
}
}
}

View File

@ -0,0 +1,11 @@
[Desktop Entry]
Name=ProjMan
GenericName=Text Editor
Comment=A source editor with syntax highlighting and procedure navigation, a context-sensitive help system, and much more.
Exec=projman %F
Terminal=false
Type=Application
StartupNotify=true
MimeType=text/plain;
Categories=Development;TextEditor;
Icon=projman-48

View File

@ -0,0 +1,6 @@
######################################################
# Tcl/Tk Project manager 2.0
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svl.ru
# Home page: https://nuk-svk.ru
######################################################

View File

@ -0,0 +1,8 @@
######################################################
# Tcl/Tk Project manager 2.0
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svl.ru
# Home page: https://nuk-svk.ru
######################################################
2. Подстветку текущей вкладки и элемента в дереве

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,15 @@
Projman is a yet another editor
Copyright: GPL
Information from the binary package:
Name : projman Relocations: (not relocatable)
Version : 1.0.3 Vendor: SVK
Release : 1 Build Date: Пн 17 сен 2018 11:49:36
Install date: (not installed) Build Host: alt-ws.localdomain
Group : System
Size : License: GPL
URL : https://bitbucket.org/svk28/rac-gui
Summary : Projman is a yet another editor
Description :
Projman is a yet another editor

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@ -0,0 +1,82 @@
######################################################
# ProjMan 2
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "", 2022, https://nuk-svk.ru
######################################################
# The config file procedures
# create
# copy
# save
######################################################
namespace eval Config {} {
variable cfgINISections
variable cfgVariables
}
if [info exists env(LANG)] {
set locale $env(LANG)
} else {
set locale "en"
}
set ::configDefault "\[General\]
locale=$locale
cfgModifyDate=''
\[GUI\]
theme=dark
toolBarShow=true
menuShow=true
filesPanelShow=true
geometry=1024x768
\[Editor\]
autoFormat=true
font=courier 10 normal roman
fontBold=courier 10 bold roman
backGround=#333333
foreground=#cccccc
selectbg=#10a410a410a4
nbNormal=#000000
nbModify=#ffff5d705d70
lineNumberFG=#a9a9a9
selectBorder=0
# must be: none, word or char
editorWrap=word
lineNumberShow=true
tabSize=4
"
proc Config::create {dir} {
set cfgFile [open [file join $dir projman.ini] "w+"]
puts $cfgFile $::configDefault
close $cfgFile
}
proc Config::read {dir} {
set cfgFile [ini::open [file join $dir projman.ini] "r"]
foreach section [ini::sections $cfgFile] {
foreach key [ini::keys $cfgFile $section] {
lappend ::cfgINIsections($section) $key
set ::cfgVariables($key) [ini::value $cfgFile $section $key]
}
}
ini::close $cfgFile
}
proc Config::write {dir} {
set cfgFile [ini::open [file join $dir projman.ini] "w"]
foreach section [array names ::cfgINIsections] {
foreach key $::cfgINIsections($section) {
ini::set $cfgFile $section $key $::cfgVariables($key)
}
}
set systemTime [clock seconds]
# Set a config modify time (i don't know why =))'
ini::set $cfgFile "General" cfgModifyDate [clock format $systemTime -format "%D %H:%M:%S"]
# Save an top level window geometry into config
ini::set $cfgFile "GUI" geometry [wm geometry .]
ini::commit $cfgFile
ini::close $cfgFile
}

View File

@ -0,0 +1,443 @@
######################################################
# ProjMan 2
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "SVK", 2022, https://nuk-svk.ru
######################################################
# Editor module
######################################################
namespace eval Editor {
variable selectionTex
proc Comment {txt} {
set selIndex [$txt tag ranges sel]
set pos [$txt index insert]
set lineNum [lindex [split $pos "."] 0]
set PosNum [lindex [split $pos "."] 1]
puts "Select : $selIndex"
if {$selIndex != ""} {
set lineBegin [lindex [split [lindex $selIndex 0] "."] 0]
set lineEnd [lindex [split [lindex $selIndex 1] "."] 0]
set posBegin [lindex [split [lindex $selIndex 1] "."] 0]
set posEnd [lindex [split [lindex $selIndex 1] "."] 1]
if {$lineEnd == $lineNum || $posEnd == 0} {
set lineEnd [expr $lineEnd - 1]
}
for {set i $lineBegin} {$i <=$lineEnd} {incr i} {
#$txt insert $i.0 "# "
regexp -nocase -indices -- {^(\s*)(.*?)} [$txt get $i.0 $i.end] match v1 v2
$txt insert $i.[lindex [split $v2] 0] "# "
}
$txt tag add comments $lineBegin.0 $lineEnd.end
$txt tag raise comments
} else {
regexp -nocase -indices -- {^(\s*)(.*?)} [$txt get $lineNum.0 $lineNum.end] match v1 v2
$txt insert $lineNum.[lindex [split $v2] 0] "# "
$txt tag add comments $lineNum.0 $lineNum.end
$txt tag raise comments
}
}
proc Uncomment {txt} {
set selIndex [$txt tag ranges sel]
set pos [$txt index insert]
set lineNum [lindex [split $pos "."] 0]
set posNum [lindex [split $pos "."] 1]
if {$selIndex != ""} {
set lineBegin [lindex [split [lindex $selIndex 0] "."] 0]
set lineEnd [lindex [split [lindex $selIndex 1] "."] 0]
set posBegin [lindex [split [lindex $selIndex 1] "."] 0]
set posEnd [lindex [split [lindex $selIndex 1] "."] 1]
if {$lineEnd == $lineNum || $posEnd == 0} {
set lineEnd [expr $lineEnd - 1]
}
for {set i $lineBegin} {$i <=$lineEnd} {incr i} {
set str [$txt get $i.0 $i.end]
if {[regexp -nocase -indices -- {(^| )(#\s)(.+)} $str match v1 v2 v3]} {
$txt delete $i.[lindex [split $v2] 0] $i.[lindex [split $v3] 0]
}
}
$txt tag remove comments $lineBegin.0 $lineEnd.end
$txt tag add sel $lineBegin.0 $lineEnd.end
$txt highlight $lineBegin.0 $lineEnd.end
} else {
#set posNum [lindex [split $pos "."] 1]
set str [$txt get $lineNum.0 $lineNum.end]
if {[regexp -nocase -indices -- {(^| )(#\s)(.+)} $str match v1 v2 v3]} {
puts ">>>>> $v1, $v2, $v3"
$txt delete $lineNum.[lindex [split $v2] 0] $lineNum.[lindex [split $v3] 0]
#$txt insert $i.0 $v3
}
$txt tag remove comments $lineNum.0 $lineNum.end
$txt highlight $lineNum.0 $lineNum.end
}
}
proc InsertTabular {txt} {
global cfgVariables
set selIndex [$txt tag ranges sel]
set pos [$txt index insert]
set lineNum [lindex [split $pos "."] 0]
puts "Select : $selIndex"
for {set i 0} {$i < $cfgVariables(tabSize)} { incr i} {
append tabInsert " "
}
puts ">$tabInsert<"
if {$selIndex != ""} {
set lineBegin [lindex [split [lindex $selIndex 0] "."] 0]
set lineEnd [lindex [split [lindex $selIndex 1] "."] 0]
set posBegin [lindex [split [lindex $selIndex 1] "."] 0]
set posEnd [lindex [split [lindex $selIndex 1] "."] 1]
# if {$lineBegin == $lineNum} {
# set lineBegin [expr $lineBegin + 1]
# }
if {$lineEnd == $lineNum || $posEnd == 0} {
set lineEnd [expr $lineEnd - 1]
}
puts "Pos: $pos, Begin: $lineBegin, End: $lineEnd"
for {set i $lineBegin} {$i <=$lineEnd} {incr i} {
#$txt insert $i.0 "# "
regexp -nocase -indices -- {^(\s*)(.*?)} [$txt get $i.0 $i.end] match v1 v2
$txt insert $i.[lindex [split $v2] 0] $tabInsert
}
$txt tag remove sel $lineBegin.$posBegin $lineEnd.$posEnd
$txt tag add sel $lineBegin.0 $lineEnd.end
$txt highlight $lineBegin.0 $lineEnd.end
} else {
# set pos [$txt index insert]
# set lineNum [lindex [split $pos "."] 0]
regexp -nocase -indices -- {^(\s*)(.*?)} [$txt get $lineNum.0 $lineNum.end] match v1 v2
puts "$v1<>$v2"
$txt insert $lineNum.[lindex [split $v2] 0] $tabInsert
}
}
proc DeleteTabular {txt} {
global cfgVariables
set selIndex [$txt tag ranges sel]
set pos [$txt index insert]
set lineNum [lindex [split $pos "."] 0]
if {$selIndex != ""} {
set lineBegin [lindex [split [lindex $selIndex 0] "."] 0]
set lineEnd [lindex [split [lindex $selIndex 1] "."] 0]
set posBegin [lindex [split [lindex $selIndex 1] "."] 0]
set posEnd [lindex [split [lindex $selIndex 1] "."] 1]
if {$lineEnd == $lineNum && $posEnd == 0} {
set lineEnd [expr $lineEnd - 1]
}
for {set i $lineBegin} {$i <=$lineEnd} {incr i} {
set str [$txt get $i.0 $i.end]
if {[regexp -nocase -indices -- {(^\s*)(.*?)} $str match v1 v2]} {
set posBegin [lindex [split $v1] 0]
set posEnd [lindex [split $v1] 1]
if {[expr $posEnd + 1] >= $cfgVariables(tabSize)} {
$txt delete $i.$posBegin $i.$cfgVariables(tabSize)
}
}
}
$txt tag remove sel $lineBegin.$posBegin $lineEnd.$posEnd
$txt tag add sel $lineBegin.0 $lineEnd.end
$txt highlight $lineBegin.0 $lineEnd.end
} else {
set str [$txt get $lineNum.0 $lineNum.end]
if {[regexp -nocase -indices -- {(^\s*)(.*?)} $str match v1]} {
set posBegin [lindex [split $v1] 0]
set posEnd [lindex [split $v1] 1]
if {[expr $posEnd + 1] >= $cfgVariables(tabSize)} {
$txt delete $lineNum.$posBegin $lineNum.$cfgVariables(tabSize)
}
}
}
}
## TABULAR INSERT (auto indent)##
proc Indent {txt} {
global cfgVariables
# set tabSize 4
set indentSize $cfgVariables(tabSize)
set pos [$txt index insert]
set lineNum [lindex [split $pos "."] 0]
set posNum [lindex [split $pos "."] 1]
puts "$pos"
if {$lineNum > 1} {
# get current text
set curText [$txt get $lineNum.0 "$lineNum.0 lineend"]
#get text of prev line
set prevLineNum [expr {$lineNum - 1}]
set prevText [$txt get $prevLineNum.0 "$prevLineNum.0 lineend"]
#count first spaces in current line
set spaces ""
regexp "^| *" $curText spaces
#count first spaces in prev line
set prevSpaces ""
regexp "^( |\t)*" $prevText prevSpaces
set len [string length $prevSpaces]
set shouldBeSpaces 0
for {set i 0} {$i < $len} {incr i} {
if {[string index $prevSpaces $i] == "\t"} {
incr shouldBeSpaces $tabSize
} else {
incr shouldBeSpaces
}
}
#see last symbol in the prev String.
set lastSymbol [string index $prevText [expr {[string length $prevText] - 1}]]
# is it open brace?
if {$lastSymbol == ":" || $lastSymbol == "\\"} {
incr shouldBeSpaces $indentSize
}
if {$lastSymbol == "\{"} {
incr shouldBeSpaces $indentSize
}
set a ""
regexp "^| *\}" $curText a
if {$a != ""} {
# make unindent
if {$shouldBeSpaces >= $indentSize} {
set shouldBeSpaces [expr {$shouldBeSpaces - $indentSize}]
}
}
if {$lastSymbol == "\["} {
incr shouldBeSpaces $indentSize
}
set a ""
regexp "^| *\]" $curText a
if {$a != ""} {
# make unindent
if {$shouldBeSpaces >= $indentSize} {
set shouldBeSpaces [expr {$shouldBeSpaces - $indentSize}]
}
}
if {$lastSymbol == "\("} {
incr shouldBeSpaces $indentSize
}
set a ""
regexp {^| *\)} $curText a
if {$a != ""} {
# make unindent
if {$shouldBeSpaces >= $indentSize} {
set shouldBeSpaces [expr {$shouldBeSpaces - $indentSize}]
}
}
set spaceNum [string length $spaces]
if {$shouldBeSpaces > $spaceNum} {
#insert spaces
set deltaSpace [expr {$shouldBeSpaces - $spaceNum}]
set incSpaces ""
for {set i 0} {$i < $deltaSpace} {incr i} {
append incSpaces " "
}
$txt insert $lineNum.0 $incSpaces
} elseif {$shouldBeSpaces < $spaceNum} {
#delete spaces
set deltaSpace [expr {$spaceNum - $shouldBeSpaces}]
$txt delete $lineNum.0 $lineNum.$deltaSpace
}
}
}
proc SelectionPaste {txt} {
set selBegin [lindex [$txt tag ranges sel] 0]
set selEnd [lindex [$txt tag ranges sel] 1]
if {$selBegin ne ""} {
$txt delete $selBegin $selEnd
$txt highlight $selBegin $selEnd
#tk_textPaste $txt
}
}
proc SelectionGet {txt} {
variable selectionText
set selBegin [lindex [$txt tag ranges sel] 0]
set selEnd [lindex [$txt tag ranges sel] 1]
if {$selBegin ne "" && $selEnd ne ""} {
set selectionText [$txt get $selBegin $selEnd]
}
}
proc ReleaseKey {k txt} {
switch $k {
Return {
set pos [$txt index insert]
set lineNum [lindex [split $pos "."] 0]
set posNum [lindex [split $pos "."] 1]
regexp {^(\s*)} [$txt get [expr $lineNum - 1].0 [expr $lineNum - 1].end] -> spaceStart
# puts "$pos, $lineNum, $posNum, >$spaceStart<"
$txt insert insert $spaceStart
Editor::Indent $txt
}
}
}
proc PressKey {k txt} {
# puts [Editor::Key $k]
switch $k {
apostrophe {
QuotSelection $txt {'}
}
quotedbl {
QuotSelection $txt {"}
}
grave {
QuotSelection $txt {`}
}
parenleft {
# QuotSelection $txt {)}
}
bracketleft {
# QuotSelection $txt {]}
}
braceleft {
# {QuotSelection} $txt {\}}
}
}
}
## GET KEYS CODE ##
proc Key {key str} {
puts "Pressed key code: $key, $str"
if {$key >= 10 && $key <= 22} {return "true"}
if {$key >= 24 && $key <= 36} {return "true"}
if {$key >= 38 && $key <= 50} {return "true"}
if {$key >= 51 && $key <= 61 && $key != 58} {return "true"}
if {$key >= 79 && $key <= 91} {return "true"}
if {$key == 63 || $key == 107 || $key == 108 || $key == 112} {return "true"}
}
proc BindKeys {w} {
global cfgVariables
# variable txt
set txt $w.frmText.t
bind $txt <KeyRelease> "Editor::ReleaseKey %K $txt"
bind $txt <KeyPress> "Editor::PressKey %K $txt"
# bind $txt <KeyRelease> "Editor::Key %k %K"
#$txt tag bind Sel <Control-/> {puts ">>>>>>>>>>>>>>>>>>>"}
#bind $txt <Control-slash> {puts "/////////////////"}
# #bind $txt <Control-g> GoToLine
# bind $txt <Control-g> {focus .frmTool.frmGoto.entGoTo; .frmTool.frmGoto.entGoTo delete 0 end}
# bind $txt <Control-agrave> Find
# bind $txt <Control-f> Find
# bind $txt <F3> {FindNext $w.text 1}
# bind $txt <Control-ecircumflex> ReplaceDialog
# bind $txt <Control-r> ReplaceDialog
# bind $txt <F4> {ReplaceCommand $w.text 1}
# bind $txt <Control-ucircumflex> {FileDialog [$noteBookFiles raise] save}
# bind $txt <Control-s> {FileDialog [$noteBookFiles raise] save}
# bind $txt <Control-ocircumflex> {FileDialog [$noteBookFiles raise] save_as}
# bind $txt <Shift-Control-s> {FileDialog [$noteBookFiles raise] save_as}
bind $txt <Control-odiaeresis> FileOper::Close
bind $txt <Control-w> FileOper::Close
# bind $txt <Control-division> "tk_textCut $w.text;break"
# bind $txt <Control-x> "tk_textCut $w.text;break"
# bind $txt <Control-ntilde> "tk_textCopy $txt"
# bind $txt <Control-c> "tk_textCopy $txt"
bind $txt <Control-igrave> "Editor::SelectionPaste $txt"
bind $txt <Control-v> "Editor::SelectionPaste $txt"
#bind $txt <Control-adiaeresis> "auto_completition $txt"
#bind $txt <Control-l> "auto_completition $txt"
bind $txt <Control-icircumflex> "auto_completition_proc $txt"
bind $txt <Control-j> "auto_completition_proc $txt"
bind $txt <Control-i> "ImageBase64Encode $txt"
bind $txt <Control-bracketleft> "Editor::InsertTabular $txt"
bind $txt <Control-bracketright> "Editor::DeleteTabular $txt"
bind $txt <Control-comma> "Editor::Comment $txt"
bind $txt <Control-period> "Editor::Uncomment $txt"
bind $txt <Control-eacute> Find
#bind . <Control-m> PageTab
#bind . <Control-udiaeresis> PageTab
bind $txt <Insert> {OverWrite}
bind $txt <ButtonRelease-1> []
bind $txt <Button-3> {catch [PopupMenuEditor %X %Y]}
bind $txt <Button-4> "%W yview scroll -3 units"
bind $txt <Button-5> "%W yview scroll 3 units"
#bind $txt <Shift-Button-4> "%W xview scroll -2 units"
#bind $txt <Shift-Button-5> "%W xview scroll 2 units"
bind $txt <<Modified>> "SetModifiedFlag $w"
bind $txt <<Selection>> "Editor::SelectionGet $txt"
}
proc QuotSelection {txt symbol} {
variable selectionText
set selIndex [$txt tag ranges sel]
set pos [$txt index insert]
set lineNum [lindex [split $pos "."] 0]
set posNum [lindex [split $pos "."] 1]
set symbol [string trim [string trimleft $symbol "\\"]]
# puts "Selindex : $selIndex, cursor position: $pos"
if {$selIndex != ""} {
set lineBegin [lindex [split [lindex $selIndex 0] "."] 0]
set posBegin [lindex [split [lindex $selIndex 0] "."] 1]
set lineEnd [lindex [split [lindex $selIndex 1] "."] 0]
set posEnd [lindex [split [lindex $selIndex 1] "."] 1]
# set selText [$txt get $lineBegin.$posBegin $lineEnd.$posEnd]
set selText $selectionText
puts "Selected text: $selText, pos: $pos, lineBegin: $lineBegin, posBegin: $posBegin, pos end: $posEnd"
if {$posNum == $posEnd} {
$txt insert $lineBegin.$posBegin "$symbol"
}
if {$posNum == $posBegin} {
$txt insert $lineBegin.$posEnd "$symbol"
}
$txt highlight $lineBegin.$posBegin $lineEnd.end
# $txt insert $lineBegin.[expr $posBegin + 1] "$symbol"
} else {
$txt insert $lineNum.[expr $posNum + 1] "$symbol"
$txt mark set insert $lineNum.[expr $posNum - 1]
# $txt see $lineNum.[expr $posNum - 1]
$txt see insert
$txt highlight $lineNum.$posNum $lineNum.end
}
}
# Create editor for new file (Ctrl+N)
proc New {} {
global nbEditor tree untitledNumber
if [info exists untitledNumber] {
incr untitledNumber 1
} else {
set untitledNumber 0
}
set filePath untitled-$untitledNumber
set fileName untitled-$untitledNumber
set fileFullPath untitled-$untitledNumber
#puts [Tree::InsertItem $tree {} $fileFullPath "file" $fileName]
set nbEditorItem [NB::InsertItem $nbEditor $fileFullPath "file"]
puts "$nbEditorItem, $nbEditor"
Editor $fileFullPath $nbEditor $nbEditorItem
}
proc Editor {fileFullPath nb itemName} {
global cfgVariables
set fr $itemName
if ![string match "*untitled*" $itemName] {
set lblName "lbl[string range $itemName [expr [string last "." $itemName] +1] end]"
ttk::label $fr.$lblName -text $fileFullPath
pack $fr.$lblName -side top -anchor w -fill x
}
set frmText [ttk::frame $fr.frmText -border 1]
set txt $frmText.t
pack $frmText -side top -expand true -fill both
pack [ttk::scrollbar $frmText.s -command "$frmText.t yview"] -side right -fill y
ctext $txt -yscrollcommand "$frmText.s set" -font $cfgVariables(font) -linemapfg $cfgVariables(lineNumberFG) \
-tabs "[expr {4 * [font measure $cfgVariables(font) 0]}] left" -tabstyle tabular -undo true
pack $txt -fill both -expand 1
puts ">>>>>>> [bindtags $txt]"
if {$cfgVariables(lineNumberShow) eq "false"} {
$txt configure -linemap 0
}
set fileType [string toupper [string trimleft [file extension $fileFullPath] "."]]
if {[info procs Highlight::$fileType] ne ""} {
Highlight::$fileType $txt
} else {
Highlight::Default $txt
}
BindKeys $itemName
# bind $txt <Return> {
# regexp {^(\s*)} [%W get "insert linestart" end] -> spaceStart
# %W insert insert "\n$spaceStart"
# break
# }
return $fr
}
}

View File

@ -0,0 +1,180 @@
######################################################
# ProjMan 2
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "", 2022, https://nuk-svk.ru
######################################################
# Working with files module
######################################################
namespace eval FileOper {
variable types
set ::types {
{"All files" *}
}
proc OpenDialog {} {
global env
set dir $env(HOME)
set fullPath [tk_getOpenFile -initialdir $dir -filetypes $::types -parent .]
set file [string range $fullPath [expr [string last "/" $fullPath]+1] end]
regsub -all "." $file "_" node
set dir [file dirname $fullPath]
set file [file tail $fullPath]
set name [file rootname $file]
set ext [string range [file extension $file] 1 end]
if {$fullPath != ""} {
puts $fullPath
return $fullPath
} else {
return
}
}
proc OpenFolderDialog {} {
global env
#global tree node types dot env noteBook fontNormal fontBold fileList noteBook projDir activeProject imgDir editor rootDir
# set dir $projDir
set dir $env(HOME)
set fullPath [tk_chooseDirectory -initialdir $dir -parent .]
set file [string range $fullPath [expr [string last "/" $fullPath]+1] end]
regsub -all "." $file "_" node
set dir [file dirname $fullPath]
# EditFile .frmBody.frmCat.noteBook.ffiles.frmTreeFiles.treeFiles $node $fullPath
puts $fullPath
return $fullPath
}
proc Close {} {
global nbEditor modified tree
set nbItem [$nbEditor select]
if {$nbItem == ""} {return}
if {$modified($nbItem) eq "true"} {
Save
}
$nbEditor forget $nbItem
destroy $nbItem
set treeItem "file::[string range $nbItem [expr [string last "." $nbItem] +1] end ]"
if {[$tree parent $treeItem] eq "" } {
$tree delete $treeItem
}
}
proc Save {} {
global nbEditor tree env
set nbEditorItem [$nbEditor select]
puts "Saved editor text: $nbEditorItem"
if [string match "*untitled*" $nbEditorItem] {
set filePath [tk_getSaveFile -initialdir $env(HOME) -filetypes $::types -parent .]
if {$filePath eq ""} {
return
}
set fileName [string range $filePath [expr [string last "/" $filePath]+1] end]
puts "$filePath, $fileName"
set treeitem [Tree::InsertItem $tree {} $filePath "file" $fileName]
} else {
set treeItem "file::[string range $nbEditorItem [expr [string last "." $nbEditorItem] +1] end ]"
set filePath [Tree::GetItemID $tree $treeItem]
}
set editedText [$nbEditorItem.frmText.t get 0.0 end]
set f [open $filePath "w+"]
puts -nonewline $f $editedText
puts "$f was saved"
close $f
ResetModifiedFlag $nbEditorItem
}
proc SaveAll {} {
}
proc Delete {} {
set node [$tree selection get]
set fullPath [$tree itemcget $node -data]
set dir [file dirname $fullPath]
set file [file tail $fullPath]
set answer [tk_messageBox -message "[::msgcat::mc "Delete file"] \"$file\"?"\
-type yesno -icon question -default yes]
case $answer {
yes {
FileDialog $tree close
file delete -force "$fullPath"
$tree delete $node
$tree configure -redraw 1
return 0
}
}
}
proc ReadFolder {dir} {
global tree
puts "Read the folder $dir"
set rList ""
if {[catch {cd $dir}] != 0} {
return ""
}
set parent [Tree::InsertItem $tree {} $dir "directory" $dir]
# if {[ $tree item $parent -open] eq "false"} {
# $tree item $parent -open true
# } else {
# $tree item $parent -open false
# }
# Getting an files and directorues lists
foreach file [glob -nocomplain *] {
lappend rList [list [file join $dir $file]]
if [file isdirectory $file] {
lappend lstDir $file
} else {
lappend lstFiles $file
}
}
# Sort lists and insert into tree
if {[info exists lstDir] && [llength $lstDir] > 0} {
foreach f [lsort $lstDir] {
puts " Tree insert item: [Tree::InsertItem $tree $parent [file join $dir $f] "directory" $f]"
}
}
if {[info exists lstFiles] && [llength $lstFiles] > 0} {
foreach f [lsort $lstFiles] {
puts "Tree insert item: [Tree::InsertItem $tree $parent [file join $dir $f] "file" $f]"
}
}
}
proc ReadFile {fileFullPath itemName} {
set txt $itemName.frmText.t
if ![string match "*untitled*" $itemName] {
set file [open "$fileFullPath" r]
$txt insert end [chan read -nonewline $file]
close $file
}
# Delete emty last line
if {[$txt get {end-1 line} end] eq "\n" || [$txt get {end-1 line} end] eq "\r\n"} {
$txt delete {end-1 line} end
puts ">[$txt get {end-1 line} end]<"
}
}
proc Edit {fileFullPath} {
global nbEditor tree
set filePath [file dirname $fileFullPath]
set fileName [file tail $fileFullPath]
regsub -all {\.|/|\\|\s} $fileFullPath "_" itemName
set itemName "$nbEditor.$itemName"
puts [Tree::InsertItem $tree {} $fileFullPath "file" $fileName]
if {[winfo exists $itemName] == 0} {
NB::InsertItem $nbEditor $fileFullPath "file"
Editor::Editor $fileFullPath $nbEditor $itemName
ReadFile $fileFullPath $itemName
$itemName.frmText.t highlight 1.0 end
ResetModifiedFlag $itemName
}
$nbEditor select $itemName
focus -force $itemName.frmText.t
return $itemName
}
}

View File

@ -0,0 +1,164 @@
######################################################
# ProjMan 2
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "", 2022, https://nuk-svk.ru
######################################################
# GUI module
#######################################################
if {[info exists cfgVariables(geometry)]} {
wm geometry . $cfgVariables(geometry)
} else {
wm geometry . 1024x768
}
# Заголовок окна
wm title . "ProjMan \($projmanVersion-$projmanRelease\)"
wm iconname . "ProjMan"
# иконка окна (берется из файла lib/imges.tcl)
wm iconphoto . projman
wm protocol . WM_DELETE_WINDOW Quit
wm overrideredirect . 0
#wm positionfrom . user
bind . <Control-q> Quit
bind . <Control-Q> Quit
bind . <Control-eacute> Quit
bind . <Insert> Add
bind . <Delete> Del
bind . <Control-Return> Edit
bind . <F1> ShowHelpDialog
bind . <Control-n> Editor::New
bind . <Control-N> Editor::New
bind . <Control-o> {
set filePath [FileOper::OpenDialog]
if {$filePath != ""} {
FileOper::Edit $filePath
}
}
bind . <Control-O> {
set filePath [FileOper::OpenDialog]
if {$filePath != ""} {
FileOper::Edit $filePath
}
}
bind . <Control-k> {
set folderPath [FileOper::OpenFolderDialog]
if {$folderPath != ""} {
FileOper::ReadFolder $folderPath
}
}
bind . <Control-K> {
set folderPath [FileOper::OpenFolderDialog]
if {$folderPath != ""} {
FileOper::ReadFolder $folderPath
}
}
bind . <Control-s> {FileOper::Save}
bind . <Control-S> {FileOper::Save}
#ttk::style configure TPanedwindow -background blue
#ttk::style configure Sash -sashthickness 5
#ttk::style configure TButton -padding 60 -relief flat -bg black
#ttk::style configure Custom.Treeview -foreground red
#ttk::style configure Custom.Treeview -rowheight 20
if [info exists cfgVariables(theme)] {
ttk::style theme use $cfgVariables(theme)
}
frame .frmMenu -border 1 -relief raised -highlightthickness 0
frame .frmBody -border 1 -relief raised -highlightthickness 0
frame .frmStatus -border 1 -relief sunken
pack .frmMenu -side top -padx 1 -fill x
pack .frmBody -side top -padx 1 -fill both -expand true
pack .frmStatus -side top -padx 1 -fill x
# pack .panel -expand true -fill both
# pack propagate .panel false
#pack [label .frmMenu.lbl -text "ddd"]
pack [label .frmStatus.lbl2 -text "ddd"]
menubutton .frmMenu.mnuFile -text [::msgcat::mc "File"] -menu .frmMenu.mnuFile.m
GetFileMenu [menu .frmMenu.mnuFile.m]
menubutton .frmMenu.mnuEdit -text [::msgcat::mc "Edit"] -menu .frmMenu.mnuEdit.m
GetEditMenu [menu .frmMenu.mnuEdit.m]
menubutton .frmMenu.mnuView -text [::msgcat::mc "View"] -menu .frmMenu.mnuView.m
GetViewMenu [menu .frmMenu.mnuView.m]
pack .frmMenu.mnuFile .frmMenu.mnuEdit .frmMenu.mnuView -side left
menubutton .frmMenu.mnuHelp -text [::msgcat::mc "Help"] -menu .frmMenu.mnuHelp.m
pack .frmMenu.mnuHelp -side right
set frmTool [ttk::frame .frmBody.frmTool]
ttk::panedwindow .frmBody.panel -orient horizontal -style TPanedwindow
pack propagate .frmBody.panel false
pack .frmBody.frmTool -side left -fill y
pack .frmBody.panel -side left -fill both -expand true
ttk::button $frmTool.btn_tree -command ViewFilesTree -image tree_32x32
pack $frmTool.btn_tree -side top -padx 1 -pady 1
# #label $frmTool.lbl_logo -image tcl
# pack $frmTool.btn_quit -side bottom -padx 5 -pady 5
# #pack $frmTool.lbl_logo -side bottom -padx 5 -pady 5
#
# # Дерево с полосами прокрутки
set frmTree [ttk::frame .frmBody.frmTree]
ttk::scrollbar $frmTree.hsb1 -orient horizontal -command {$frmTree.tree xview}
ttk::scrollbar $frmTree.vsb1 -orient vertical -command [list $frmTree.tree yview]
set tree [ttk::treeview $frmTree.tree -show tree \
-xscrollcommand {$frmTree.hsb1 set} -yscrollcommand [list $frmTree.vsb1 set]]
bind $tree <Double-ButtonPress-1> {Tree::DoublePressItem $tree}
bind $tree <ButtonRelease> {Tree::PressItem $tree}
grid $tree -row 0 -column 0 -sticky nsew
grid $frmTree.vsb1 -row 0 -column 1 -sticky nsew
grid $frmTree.hsb1 -row 1 -column 0 -sticky nsew
grid columnconfigure $frmTree 0 -weight 1
grid rowconfigure $frmTree 0 -weight 1
set frm_work [ttk::frame .frm_work]
set nbEditor [ttk::notebook $frm_work.nbEditor]
#grid $nbEditor -row 0 -column 0 -sticky nsew
pack $nbEditor -fill both -expand true
# Create an image CLOSE for tab
ttk::style element create close_button image close_10x10 -height 12 -width 12 -sticky e -padding {10 0}
ttk::style layout TNotebook.Tab {
Notebook.tab -sticky nswe -children {
Notebook.padding -expand 1 -sticky nswe -children {
Notebook.label
-expand 1 -sticky nesw -side left close_button -side right
}
}
}
bind TNotebook <Button-1> "NB::CloseTab %W %x %y\;[bind TNotebook <Button-1>]"
# ttk::scrollbar $nbEditor.hsb1 -orient horizontal -command [list $frm_tree.work xview]
# ttk::scrollbar $fbEditor.vsb1 -orient vertical -command [list $frm_tree.work yview]
# set tree [ttk::treeview $frm_tree.tree -show tree \
# -xscrollcommand [list $frm_tree.hsb1 set] -yscrollcommand [list $frm_tree.vsb1 set]]
#
# # назначение обработчика нажатия кнопкой мыши
# #bind $frm_tree.tree <ButtonRelease> "TreePress %x %y %X %Y $frm_tree.tree"
# bind $frm_tree.tree <ButtonRelease> "TreePress $frm_tree.tree"
#.panel add $frmTool -weight 1
if {$cfgVariables(toolBarShow) eq "true"} {
.frmBody.panel add $frmTree -weight 0
}
.frmBody.panel add $frm_work -weight 1
# #

View File

@ -0,0 +1,44 @@
######################################################
# ProjMan 2
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "", 2022, https://nuk-svk.ru
######################################################
namespace eval Highlight {} {
proc TCL {txt} {
ctext::addHighlightClass $txt widgets purple [list ctext button label text frame toplevel scrollbar checkbutton canvas listbox menu menubar menubutton radiobutton scale entry message tk_chooseDir tk_getSaveFile tk_getOpenFile tk_chooseColor tk_optionMenu]
ctext::addHighlightClassForRegexp $txt flags orange {\s-[a-zA-Z]+}
ctext::addHighlightClass $txt stackControl #19a2a6 [info commands]
ctext::addHighlightClassWithOnlyCharStart $txt vars #4471ca "\$"
ctext::addHighlightClass $txt variable_funcs gold {set global variable unset}
ctext::addHighlightClassForSpecialChars $txt brackets green {[]{}()}
ctext::addHighlightClassForRegexp $txt paths lightblue {\.[a-zA-Z0-9\_\-]+}
ctext::addHighlightClassForRegexp $txt comments #666666 {(#|//)[^\n\r]*}
ctext::addHighlightClassForRegexp $txt namespaces #4f64ff {::}
ctext::addHighlightClassForSpecialChars $txt qoute #b84a0c {"'`}
}
proc Default {txt} {
ctext::addHighlightClassForRegexp $txt flags orange {\s-[a-zA-Z\-_]+}
ctext::addHighlightClass $txt stackControl #19a2a6 [info commands]
ctext::addHighlightClassWithOnlyCharStart $txt vars #4471ca "\$"
ctext::addHighlightClass $txt variable_funcs gold {set global variable unset}
ctext::addHighlightClassForSpecialChars $txt brackets green {[]{}()}
ctext::addHighlightClassForRegexp $txt paths lightblue {\.[a-zA-Z0-9\_\-]+}
ctext::addHighlightClassForRegexp $txt comments #666666 {(#|//)[^\n\r]*}
ctext::addHighlightClassForRegexp $txt namespaces #4f64ff {::}
ctext::addHighlightClassForSpecialChars $txt qoute #b84a0c {"'`}
}
proc SH {txt} {
ctext::addHighlightClassForRegexp $txt flags orange {-+[a-zA-Z\-_]+}
ctext::addHighlightClass $txt stackControl #19a2a6 {if fi else elseif then while case esac do in exit source echo}
ctext::addHighlightClassWithOnlyCharStart $txt vars #4471ca "\$"
ctext::addHighlightClassForRegexp $txt vars_extended #4471ca {\$\{[a-zA-Z0-9\_\-:\./\$\{\}]+\}}
ctext::addHighlightClass $txt variable_funcs gold {set export}
ctext::addHighlightClassForSpecialChars $txt brackets green {[]{}()}
ctext::addHighlightClassForRegexp $txt paths lightblue {\.[a-zA-Z0-9\_\-]+}
ctext::addHighlightClassForRegexp $txt comments #666666 {(#|//)[^\n\r]*}
ctext::addHighlightClassForSpecialChars $txt qoute #b84a0c {"'`}
}
}

View File

@ -0,0 +1,126 @@
######################################################
# ProjMan 2
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "", 2022, https://nuk-svk.ru
######################################################
# Base64 encoded Images library
######################################################
image create photo projman -data {
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAAsSAAALEgHS3X78AAAAB3RJTUUH1AsFAhA0bYcHMAAACoFJREFUeNqlV1uMG9UZ/uZiz9ge
X9drr51dZ7037SUkQEJIwqUh3BTRClqREBWqVmorpbxQIaU8UGiloraqVKlPqA/QBwRFItA2AcqG
hGwgLNmEvWSzt6zjvXl37V2P7+OxZ8Yzc/qAF6WwCUj80pFGo3P5znf+833nZ3DjoABQkoTogQN4
7e23Ecvl8ODu3XidYcBOTGAEAMF3DHaTf0y9WQBQ4+PY2t8P8fnnYVy4gIeeeQZ/TiTQX+9rqc9B
Xzderzfz2wD8EsCbb77JBoPBTofg+BVrYY/QFN0IALHYGVXTzlxsbLz8+DvvrOcTCbwLQBIE4anD
hw//5mdHn+urKAZ1ZagfU+Oj4pX40MupheR8Xqp+Yph0RleNSh3MzQE4HA6PKIo/Hx4bfprneYbj
ObAsC0J4rrXt7ntNkuqIxSpvsGyV0XWdGR0dzw5cKTuf/usVKpeT0C3E9YP7dzbced+uF8+dOp4f
Gp44zXENr1to22eiKEqiKNZwA7o3GNBPnjy5vpxYFhbmFxxyWRZsNhsjCB5YOTtY+lPnxUvNwbJU
Hnnttdcc/VeYt196dWLLyloZUmFNWbr06pnFpbgS6WgL7Lprvz0a8fccfOiePXff+313SswWlhbm
CgCMrx4Lc903MQyjpKpqvCyVEzWttsVmtwVC4RDNsgpSq59h7DIlyLJ8ded9P378L28s7imVNcBQ
DKTPDpHixB+kUunq3t2LdzU00I4tLXvo7X1DvunZYM/E1KSQTq7NmqZZBoh+IwAAYKiqmiuXy/Fo
NOpzu907g6EgBzKHhfkcHEIX7XQ3No+kWm+bSyo8ANDSldi+aP7lUx+8Fz954sT0wYO5aGJZ2p7M
bIG4No9MzmWXq9neQlp0GZqxrhtG5nommI0EfOGFF3p9Pp9x/vx5FYC2bdu22yJbI3fb7XY+uXoV
lQoPl7uZKmqCEMuHBKliUABgYdR8c+/Dfbd1Cg9IxYzSu8P2RDrf2jA5kcf4qIjmLRF0tbWzJUmM
EJN1NLZERFVVipqiaAAIAwChUMjP2/j+7p7uHQcOHGAbGhpYp8v5WLQjesvq6iqbzarYseMeWKxW
rEkeamSBZQioLyhjPA2J9Up4T2vB7fI473X7klsHP+VINpXO5dLZheRqknO4vFzPjl32/fvv74m2
R++iaMqYi12LAdBYANTIyAjH2/jOnbt2RvyN/l3bd2yfTa2ltjMMw2UyGfR296GpKYyavgxJMxmT
UP+fybW07vdtc+n0Mn3+4zLy6ZqsVMqfrKVSo5Zc/nuc4L73wbaodfut2zkrQ3WtLi7+GsA5ACoL
APPz86aiKgu6oW/p7OrsKsvljmBTkMplcxRLs+ju7sZKcgU2uw2SUvmCeloHAQ3dpHHfbT7Llctj
WFq+gMQyyalq4ezl0bHjtVot1traSovp1I7pyZlGmmaBikSPjAxnAfgBJBgAlKqqRlkqLxWLRVex
UGxXNZVpCjVR2UwWglMAZ+VQ02vgrBxG4jWs5lmEbSlSMZwUMXXcfwuN8cH3sZTIV0Ux078wv9Cv
KMowgBWapsVMOu2TZblXKkv0mVOnZhcWFj/WNe0igPQGlzRN026n09nqEByPCoLwADFJr1SWlI7O
Dtbv97v27ttrafQ30v/4r4jPZikc6DNw5qoXHmYdW9R+rC5MZmqGcbZSrR4nhEwASABQAXAAoizL
PsuwrEdT1Y8IITMApgDkN5TQNE2zVCwWY4qivC6X5UsWi2VfoVAwCoWClWGYplKxdPevn31uq26B
hSezcPt6AVRglwZRKiUqxXL5HCHkQwATAFYBKPWrpgJY1HX9b7quewHkAaQBFAAY15uRAUBWVXVR
VdUUgDEAnK7rAMAllhJ9M4vS74dmtFu22BSAdQCoov3Op+ArvZtPnvzXR4ZhXLpu5xuKZwKoAJit
S78JoLbhD5u5oV4Ho25YMgAmEAjwuVxJA4CAh4Ws6HUzUREO+b19fX1NsVhMVRRFv4H51Opzk2+y
Y9Q76QBw4j//cSwtLfV8Pjh4jFVSfYAPNitBtQ7AQkqIbI3YXR7XD/iP+KmpyamsLMvFjfGbzIub
SfFXg24Lhbq9Xu9LPp/voJ2z8h9OUugKlM2i3kClcjqi7jQ6W2xoCjW5/X5/WNO0SjaTTdZqNfVm
NvxNDOB3L77oCTU17bk6On50fGz0e01NQS6VyYHRWwjPO2RNNpwAwBNRp+BmOY6zR9uj+wlIl91u
bxv8dPCVcrmcrh/lDWNTBo48eYRTZPkQTchvu9rb9hk1jT/x3vsYHR+vUt5bSWvIKqtwOZKiTCLs
lTmXYGObI828aZoQBEGw2WxdlUpFLBaLq5qmyTdj4msAfvmLX3jvuH3n407e/idxLdWRTK0y07EY
puNzmUw2+4GreZ816LNZaM7rXEnM5Z98bG9+avzCBGflvH6/3w4KlMfrcbrd7ls5K8dmM9m4qqrV
emLfHMCx547xlGkeLmSyx1rCoSjPWvDhwDlcGB4pVxXl1NGjR7OLebcGYoT9jUHXzCrN5AoSI+jz
b128eHE20BjoCIVCgklMOJ1OwWazdaiqmq/IlWSlUilvxsSXAH7y1I+9DR7f4a0tkT9qcrV1cmoC
ly6PkWtzS2lFUc7ohv7WoUOH9IVy8zOLy2ul7o5m1+SiyvQ0rC2m5i69MjkxeTp+LZ6NRCK3+hv9
DpqmKbfH7RQEYZuFtXDFQnFOUZQqIcT4GoCf/PQptjkcPlIUs8fsVmur4OBxaewyGbk8XiqVpbOE
kFMEZDiTyYwEwu27F1Ny8I5tIX4sVqB2BuYHBs+fPW6a5rokSSsVucL5fL72YDAo6LoOh8Mh8Da+
VVXUgizLSVmW/48JBgBFE9LRGYm86eGFSCwWw7kLg2Qqdm1d1WoDuq6/RUCGASyvra2VutvDH2s6
ae1pbwpfmx5Lzwz983eqqk4B0ADI6XQ6lkwmS/5G/zaO5xxaTaMb/Y0ul8vVx7KsNZvJziqKUt3Q
CQYAU5ErT9/e0/sIx/OIxeNkOh4v5fKFAdM0TxFChgEkAVQBmLGZy4WC4R995J5o52cD/36/lF35
V133NzylWiqVkpqm8V6Pt9XldDm1moYGf4Ngs9vaqpVqtpAvJFRVLW+8iFgATzgczl2p9XUyOTuz
XlHVjxRFOV5fPLGx+JdyJsULTx75kd/nZCeGh4dnv/quNE1TSq+n46IoFsPh8DZBEISZ6RlaKklO
wSFEsplsvFAoJADUGAA0z/NFQtPNiZWEWK3VLhQKhTOEkNHrd/7V7H344YcbS6WSa2hoaHqT22Ua
hlEplUpJVVO5QCDQpqqq0NXZhUAw4FpeXl5fWVkZA1BhAZiKogzPzc89W6vVvDRNK6Zprtct84Zy
2tLSkpmcnAzUzYpsovmKpmlLw58Pvz4/N7/10cce/SGhCDMxPsGpihoG4AIgsnW0VcMw4gCshmGY
9YTSblbbMQyT5jhud/0IazcwnpphGHOZTObv5wbOdZ8+fbrX6/HmRVFMbNSO1CYV8beqeA8dOsRm
Mpm9AwMDn1+XhJsaGgA7gCiArQBsANbrL6IC9R2ra8tmHn8DEDYAjjpjCgAJgP4/zJqKdgq3EfoA
AAAASUVORK5CYII=
}
image create photo folder -data {
R0lGODlhEAANAOMMAAAAABwcHC4uLlxcXGpqant7e4ODg4aGhqGhoaioqLCwsLe3t///////////
/////yH5BAEKAA8ALAAAAAAQAA0AAAQ48Ell6pA4v5WqKYSGKZ33HUiKhA9ivp4AtDAs07V5u3k8
8z3DLlgZEo3BG0HAbDqZgdkDQK1arREAOw==
}
image create photo imgFile -data {
R0lGODlhCwANAPcAAAAAAAEBAQICAgMDAwQEBAUFBQYGBgcHBwgICAkJCQoKCgsLCwwMDA0NDQ4O
Dg8PDxAQEBERERISEhMTExQUFBUVFRYWFhcXFxgYGBkZGRoaGhsbGxwcHB0dHR4eHh8fHyAgICEh
ISIiIiMjIyQkJCUlJSYmJicnJygoKCkpKSoqKisrKywsLC0tLS4uLi8vLzAwMDExMTIyMjMzMzQ0
NDU1NTY2Njc3Nzg4ODk5OTo6Ojs7Ozw8PD09PT4+Pj8/P0BAQEFBQUJCQkNDQ0REREVFRUZGRkdH
R0hISElJSUpKSktLS0xMTE1NTU5OTk9PT1BQUFFRUVJSUlNTU1RUVFVVVVZWVldXV1hYWFlZWVpa
WltbW1xcXF1dXV5eXl9fX2BgYGFhYWJiYmNjY2RkZGVlZWZmZmdnZ2hoaGlpaWpqamtra2xsbG1t
bW5ubm9vb3BwcHFxcXJycnNzc3R0dHV1dXZ2dnd3d3h4eHl5eXp6ent7e3x8fH19fX5+fn9/f4CA
gIGBgYKCgoODg4SEhIWFhYaGhoeHh4iIiImJiYqKiouLi4yMjI2NjY6Ojo+Pj5CQkJGRkZKSkpOT
k5SUlJWVlZaWlpeXl5iYmJmZmZqampubm5ycnJ2dnZ6enp+fn6CgoKGhoaKioqOjo6SkpKWlpaam
pqenp6ioqKmpqaqqqqurq6ysrK2tra6urq+vr7CwsLGxsbKysrOzs7S0tLW1tba2tre3t7i4uLm5
ubq6uru7u7y8vL29vb6+vr+/v8DAwMHBwcLCwsPDw8TExMXFxcbGxsfHx8jIyMnJycrKysvLy8zM
zM3Nzc7Ozs/Pz9DQ0NHR0dLS0tPT09TU1NXV1dbW1tfX19jY2NnZ2dra2tvb29zc3N3d3d7e3t/f
3+Dg4OHh4eLi4uPj4+Tk5OXl5ebm5ufn5+jo6Onp6erq6uvr6+zs7O3t7e7u7u/v7/Dw8PHx8fLy
8vPz8/T09PX19fb29vf39/j4+Pn5+fr6+vv7+/z8/P39/f7+/v///yH5BAEAAKoALAAAAAALAA0A
AAg5AFUJHEhQIICDCA8OBPCvoUOGBh0+VMgw4UNVDCVerHhQIgCMGjf+S5jxY8aQJkdaHAkyJEuS
JAMCADs=
}
image create photo tree_32x32 -data {
iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9
kT1Iw1AUhU9TpaIVBzuIdMhQnSyIFXHUKhShQqgVWnUweekfNDEkKS6OgmvBwZ/FqoOLs64OroIg
+APi6OSk6CIl3pcUWsT44PI+znvncN99gNCoMs3qGgc03TYzqaSYy6+IoVeE0EcVRUJmljErSWn4
rq97BPh+F+dZ/vf+XP1qwWJAQCSeYYZpE68TT23aBud94ggryyrxOfGYSQ0SP3Jd8fiNc8llgWdG
zGxmjjhCLJY6WOlgVjY14knimKrplC/kPFY5b3HWqjXW6pO/MFzQl5e4ThVFCgtYhAQRCmqooAob
cdp1Uixk6Dzp4x92/RK5FHJVwMgxjw1okF0/+B/8nq1VTEx4SeEk0P3iOB8jQGgXaNYd5/vYcZon
QPAZuNLb/o0GMP1Jer2txY6AgW3g4rqtKXvA5Q4w9GTIpuxKQSqhWATez+ib8sDgLdC76s2tdY7T
ByBLs0rfAAeHwGiJstd83t3TObd/77Tm9wNyw3KnzSNOGAAAAAZiS0dEAJ8AMACxMhhtNAAAAAlw
SFlzAAAuIwAALiMBeKU/dgAAAAd0SU1FB+YHCwkONjcAirYAAAAZdEVYdENvbW1lbnQAQ3JlYXRl
ZCB3aXRoIEdJTVBXgQ4XAAAAyklEQVRYw+2VMQ7DIAxFf9KcoVfIKdrJUm6TnqU9Ry8QiY0DdPaW
OXvndmFAWQDVtdzKlhBCIPiY7wfg8WPR5YMQwkv6ACLqWtb31jI0KJwxp34BwBYydErt2OyhvZeI
6C4o7AYg/p2HGMBa8/YVwRKCtrRRNFVlmnwaCkKu2h7qC7e4ENH5i3yaAYytVTZp8qnGQ2uWpWl/
I9Uny8o1prZZ+8sWAA9hDfyJIBaCpHPIOeQccg45h5xDziHnkBUOmYtDYX5Ma55agt4p2lAY80lC
JwAAAABJRU5ErkJggg==
}
image create photo close_12x12 -data {
iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAYAAABWdVznAAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9
kT1Iw1AUhU9TpaIVBzuIdMhQnSyIFXHUKhShQqgVWnUweekfNDEkKS6OgmvBwZ/FqoOLs64OroIg
+APi6OSk6CIl3pcUWsT44PI+znvncN99gNCoMs3qGgc03TYzqaSYy6+IoVeE0EcVRUJmljErSWn4
rq97BPh+F+dZ/vf+XP1qwWJAQCSeYYZpE68TT23aBud94ggryyrxOfGYSQ0SP3Jd8fiNc8llgWdG
zGxmjjhCLJY6WOlgVjY14knimKrplC/kPFY5b3HWqjXW6pO/MFzQl5e4ThVFCgtYhAQRCmqooAob
cdp1Uixk6Dzp4x92/RK5FHJVwMgxjw1okF0/+B/8nq1VTEx4SeEk0P3iOB8jQGgXaNYd5/vYcZon
QPAZuNLb/o0GMP1Jer2txY6AgW3g4rqtKXvA5Q4w9GTIpuxKQSqhWATez+ib8sDgLdC76s2tdY7T
ByBLs0rfAAeHwGiJstd83t3TObd/77Tm9wNyw3KnzSNOGAAAAAZiS0dEAJ8AMACxMhhtNAAAAAlw
SFlzAAAuIwAALiMBeKU/dgAAAAd0SU1FB+YHCww0DNJuT5YAAAAZdEVYdENvbW1lbnQAQ3JlYXRl
ZCB3aXRoIEdJTVBXgQ4XAAAATUlEQVQoz52QQQ4AMQgCR9/rc/xv99SkIdWN5QgoqGXmAogIo8H2
uRKdGcCU0CTVrBIqrtx24ky1ru+tojPEe6XR0aO3dubbkP+ZVfsAVVNBhh3Rb78AAAAASUVORK5C
YII=
}
image create photo close_10x10 -data {
iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAABhGlDQ1BJQ0MgcHJvZmlsZQAAKJF9
kT1Iw1AUhU9TpaIVBzuIdMhQnSyIFXHUKhShQqgVWnUweekfNDEkKS6OgmvBwZ/FqoOLs64OroIg
+APi6OSk6CIl3pcUWsT44PI+znvncN99gNCoMs3qGgc03TYzqaSYy6+IoVeE0EcVRUJmljErSWn4
rq97BPh+F+dZ/vf+XP1qwWJAQCSeYYZpE68TT23aBud94ggryyrxOfGYSQ0SP3Jd8fiNc8llgWdG
zGxmjjhCLJY6WOlgVjY14knimKrplC/kPFY5b3HWqjXW6pO/MFzQl5e4ThVFCgtYhAQRCmqooAob
cdp1Uixk6Dzp4x92/RK5FHJVwMgxjw1okF0/+B/8nq1VTEx4SeEk0P3iOB8jQGgXaNYd5/vYcZon
QPAZuNLb/o0GMP1Jer2txY6AgW3g4rqtKXvA5Q4w9GTIpuxKQSqhWATez+ib8sDgLdC76s2tdY7T
ByBLs0rfAAeHwGiJstd83t3TObd/77Tm9wNyw3KnzSNOGAAAAAZiS0dEAJ8AMACxMhhtNAAAAAlw
SFlzAAAuIwAALiMBeKU/dgAAAAd0SU1FB+YHCww2COc16Q0AAAAZdEVYdENvbW1lbnQAQ3JlYXRl
ZCB3aXRoIEdJTVBXgQ4XAAAARElEQVQY05WPwQ0AIAgDr2zNBIytLxPToNE+j9KCMnMAVJVotObh
oDMByMFKdqZb4r6oU5XfHTzqr/rpmc7UtcTJ5GwCGLsw4txYqA4AAAAASUVORK5CYII=
}

View File

@ -0,0 +1,64 @@
#!/usr/bin/wish
######################################################
# ProjMan 2
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "", 2022, https://nuk-svk.ru
######################################################
# Generate menu module
######################################################
proc GetFileMenu {m} {
$m add command -label [::msgcat::mc "New file"] -command Editor::New\
-accelerator "Ctrl+N"
$m add command -label [::msgcat::mc "Open file"] -accelerator "Ctrl+O" -command {
set filePath [FileOper::OpenDialog]
if {$filePath != ""} {
FileOper::Edit $filePath
}
}
$m add command -label [::msgcat::mc "Open folder"] -accelerator "Ctrl+K" -command {
set folderPath [FileOper::OpenFolderDialog]
if {$folderPath != ""} {
FileOper::ReadFolder $folderPath
}
}
$m add command -label [::msgcat::mc "Save file"] -command {FileOper::Save}\
-accelerator "Ctrl+S"
#$m add command -label [::msgcat::mc "Open"] -command {FileDialog $tree open}\
#-font $fontNormal -accelerator "Ctrl+O" -state disable
$m add separator
$m add command -label [::msgcat::mc "Exit"] -command Quit -accelerator "Ctrl+Q"
}
proc GetEditMenu {m} {
$m add command -label [::msgcat::mc "Undo"] -command Undo\
-accelerator "Ctrl+Z"
$m add command -label [::msgcat::mc "Redo"] -command Redo\
-accelerator "Ctrl+Y"
$m add separator
$m add command -label [::msgcat::mc "Copy"] -command Copy\
-accelerator "Ctrl+C"
$m add command -label [::msgcat::mc "Paste"] -command Paste\
-accelerator "Ctrl+V"
$m add command -label [::msgcat::mc "Cut"] -command Cut\
-accelerator "Ctrl+Z"
$m add separator
$m add command -label [::msgcat::mc "Find"] -command Find\
-accelerator "Ctrl+F"
$m add command -label [::msgcat::mc "Replace"] -command Replace\
-accelerator "Ctrl+R"
$m add separator
$m add command -label [::msgcat::mc "Find in files"] -command File::Find\
-accelerator "Ctrl+Shift+F"
$m add command -label [::msgcat::mc "Replace in files"] -command File::Replace\
-accelerator "Ctrl+Shift+RV"
}
proc GetViewMenu {m} {
$m add command -label [::msgcat::mc "View files tree"] -command ViewFilesTree
$m add command -label [::msgcat::mc "View line numbers"] -command ViewLineNumbers
}

View File

@ -72,6 +72,7 @@
::msgcat::mcset ru "File modify" "Файл изменен"
::msgcat::mcset ru "File saved" "Файл сохранен"
::msgcat::mcset ru "Find" "Найти"
::msgcat::mcset ru "Find in files" "Найти в файлах"
::msgcat::mcset ru "Font normal" "Нормальный шрифт"
::msgcat::mcset ru "Font bold" "Жирный шрифт"
::msgcat::mcset ru "FTP password" "FTP пароль"
@ -112,6 +113,7 @@
::msgcat::mcset ru "Not found active project" "Не определен активный проект"
::msgcat::mcset ru "Open" "Открыть"
::msgcat::mcset ru "Open file" "Открыть файл"
::msgcat::mcset ru "Open folder" "Открыть папку"
::msgcat::mcset ru "Open project" "Открыть проект"
::msgcat::mcset ru "Opened file in progress" "Открытие файла"
::msgcat::mcset ru "Operators" "Операторы"
@ -143,6 +145,7 @@
::msgcat::mcset ru "Redo" "Повторить"
::msgcat::mcset ru "Refresh" "Обновить"
::msgcat::mcset ru "Replace" "Замена"
::msgcat::mcset ru "Replace in files" "Заменить в файлах"
::msgcat::mcset ru "Replace with" "Заменить на"
::msgcat::mcset ru "Replace all" "Заменить все"
::msgcat::mcset ru "Release" "Выпуск"
@ -179,8 +182,11 @@
::msgcat::mcset ru "Variables" "Переменные"
::msgcat::mcset ru "Version" "Версия"
::msgcat::mcset ru "View" "Вид"
::msgcat::mcset ru "View files tree" "Показывать дерево файлов"
::msgcat::mcset ru "View line numers" "Показывать номера строк"
::msgcat::mcset ru "Warning" "Внимание"
::msgcat::mcset ru "Was replacement" "Было заменено"
::msgcat::mcset ru "Word wrapping" "Перенос слов"
::msgcat::mcset ru "Work dir" "Рабочий каталог"

View File

@ -0,0 +1,38 @@
######################################################
# ProjMan 2
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "", 2022, https://nuk-svk.ru
######################################################
#
# Operation with NoteBook widget module
#
######################################################
namespace eval NB {
proc InsertItem {nb item type} {
switch $type {
file {
regsub -all {\.|/|\\|\s} $item "_" itemName
if [winfo exists $nb.$itemName] {
set fm $nb.$itemName
} else {
set fm [ttk::frame $nb.$itemName]
pack $fm -side top -expand true -fill both
$nb add $fm -text [file tail $item];# -image close_12x12 -compound right
$nb select $fm
}
}
}
puts "NB item - $fm"
return $fm
}
proc CloseTab {w x y} {
if {[$w identify $x $y] == "close_button"} {
puts "Hurrah! Close tab [$w index @$x,$y] plz."
FileOper::Close
}
}
}

View File

@ -0,0 +1,73 @@
######################################################
# ProjMan 2
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "", 2022, https://nuk-svk.ru
######################################################
#
# All procedures module
#
######################################################
proc Quit {} {
global dir
Config::write $dir(cfg)
exit
}
proc ViewFilesTree {} {
global cfgVariables
if {$cfgVariables(toolBarShow) eq "true"} {
.frmBody.panel forget .frmBody.frmTree
set cfgVariables(toolBarShow) false
} else {
.frmBody.panel insert 0 .frmBody.frmTree
set cfgVariables(toolBarShow) true
}
}
# Enable/Disabled line numbers in editor
proc ViewLineNumbers {} {
global cfgVariables nbEditor
# Changed global settigs
if {$cfgVariables(lineNumberShow) eq "true"} {
set cfgVariables(lineNumberShow) false
} else {
set cfgVariables(lineNumberShow) true
}
# apply changes for opened tabs
foreach node [$nbEditor tabs] {
$node.frmText.t configure -linemap $cfgVariables(lineNumberShow)
}
}
proc Del {} {
return
}
proc YScrollCommand {txt canv} {
$txt yview
$canv yview"
}
proc ResetModifiedFlag {w} {
global modified nbEditor
$w.frmText.t edit modified false
set modified($w) "false"
set lbl [string trimleft [$nbEditor tab $w -text] "* "]
puts "ResetModifiedFlag: $lbl"
$nbEditor tab $w -text $lbl
}
proc SetModifiedFlag {w} {
global modified nbEditor
#$w.frmText.t edit modified false
set modified($w) "true"
set lbl [$nbEditor tab $w -text]
puts "SetModifiedFlag: $w; $modified($w); >$lbl<"
if {[regexp -nocase -all -- {^\*} $lbl match] == 0} {
set lbl "* $lbl"
}
$nbEditor tab $w -text $lbl
}

View File

@ -0,0 +1,86 @@
#!/usr/bin/wish
######################################################
# ProjMan 2
# Distributed under GNU Public License
# Author: Sergey Kalinin svk@nuk-svk.ru
# Copyright (c) "", 2022, https://nuk-svk.ru
######################################################
#
# Tree widget working module
#
######################################################
namespace eval Tree {
proc InsertItem {tree parent item type text} {
# set img [GetImage $fileName]
set dot "_"
puts "$tree $parent $item $type $text"
switch $type {
file {
regsub -all {\.|/|\\|\s} $item "_" subNode
puts $subNode
set image imgFile
}
directory {
regsub -all {\.|/|\\|\s} $item "_" subNode
puts $subNode
set image folder
}
}
append id $type "::" $subNode
puts $id
if ![$tree exists $id] {
$tree insert $parent end -id "$id" -text $text -values "$item" -image $image
}
return "$id"
}
proc DoublePressItem {tree} {
set id [$tree selection]
$tree tag remove selected
$tree item $id -tags selected
set values [$tree item $id -values]
set key [lindex [split $id "::"] 0]
if {$values eq "" || $key eq ""} {return}
puts "$key $tree $values"
switch $key {
directory {
FileOper::ReadFolder $values
}
file {
FileOper::Edit $values
# $tree item $id -open false
}
}
}
proc PressItem {tree} {
set id [$tree selection]
$tree tag remove selected
$tree item $id -tags selected
set values [$tree item $id -values]
set key [lindex [split $id "::"] 0]
if {$values eq "" || $key eq ""} {return}
puts "$key $tree $values"
switch $key {
directory {
FileOper::ReadFolder $values
# $tree item $id -open false
}
file {
FileOper::Edit $values
}
}
#
}
proc GetItemID {tree item} {
if [$tree exists $item] {
return [$tree item $item -values]
}
}
}

View File

@ -0,0 +1,192 @@
# SVG Image License
This License applies to the PNG images, built from the SVG images in the
adapta theme using `tool/svg.py`, ONLY! This License does not cover
`adapta.tcl`, which is covered by GNU GPLv3 as it is derived from
`equilux.tcl`, which is derived from `arc.tcl`.
[CC BY-SA is one-way compatible with GNU GPLv3](https://wiki.creativecommons.org/wiki/ShareAlike_compatibility:_GPLv3),
and thus theme `adapta` can be used as if it were licensed under
`GNU GPLv3`.
Note that the `adapta`-theme code/markup files are licensed under GNU
GPLv2, which is incompatible with GNU GPLv3 (as it does not specify
`Or at your option, any later version`), but no files covered by only
GPLv2 from the `adapta` theme are included, so it does NOT apply.
Original Theme [`adapta-gtk-theme`](https://github.com/adapta-project/adapta-gtk-theme)
**Authors**: `@tista500` and others
# Attribution-ShareAlike 4.0 International
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
### Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
* __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors).
* __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensors permission is not necessary for any reasonfor example, because of any applicable exception or limitation to copyrightthen that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees).
## Creative Commons Attribution-ShareAlike 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
### Section 1 Definitions.
a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
c. __BY-SA Compatible License__ means a license listed at [creativecommons.org/compatiblelicenses](http://creativecommons.org/compatiblelicenses), approved by Creative Commons as essentially the equivalent of this Public License.
d. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
e. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
f. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
g. __License Elements__ means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.
h. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
i. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
j. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License.
k. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
l. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
m. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
### Section 2 Scope.
a. ___License grant.___
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
A. reproduce and Share the Licensed Material, in whole or in part; and
B. produce, reproduce, and Share Adapted Material.
2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
3. __Term.__ The term of this Public License is specified in Section 6(a).
4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
5. __Downstream recipients.__
A. __Offer from the Licensor Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
B. __Additional offer from the Licensor Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapters License You apply.
C. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
b. ___Other rights.___
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
### Section 3 License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
a. ___Attribution.___
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed Material:
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
b. ___ShareAlike.___
In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
1. The Adapters License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
### Section 4 Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
### Section 5 Disclaimer of Warranties and Limitation of Liability.
a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__
b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
### Section 6 Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
### Section 7 Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
### Section 8 Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
> Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the [CC0 Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/legalcode). Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
>
> Creative Commons may be contacted at creativecommons.org.

View File

@ -0,0 +1,338 @@
# Copyright (C) 2018 RedFantom
# Derived from https://github.com/adapta-project/adapta-gtk-theme (GNU GPLv2)
# Based on /ttkthemes/ttkthemes/themes/arc/arc.tcl (GNU GPLv3)
# Available under the GNU GPLv3, or at your option any later version
# Theme Adapta
namespace eval ttk::theme::adapta {
# Widget colors
variable colors
array set colors {
-foreground "#000000"
-background "#fafbfc"
-disabledbg "#fafbfc"
-disabledfg "#c3c5d6"
-selectbg "#00bcd4"
-selectfg "#ffffff"
-window "#fafbfc"
-focuscolor "#1ee9b7"
-checklight "#1ee9b7"
}
# Function to load images from subdirectory
variable directory
# Subdirectory /adapta
set directory [file join [file dirname [info script]] adapta]
variable images
# Load the images
foreach file [glob -directory $directory *.png] {
set img [file tail [file rootname $file]]
set images($img) [image create photo -file $file -format png]
}
# Create a new ttk::style
ttk::style theme create adapta -parent default -settings {
# Configure basic style settings
ttk::style configure . \
-background $colors(-background) \
-foreground $colors(-foreground) \
-troughcolor $colors(-background) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-fieldbackground $colors(-window) \
-font TkDefaultFont \
-borderwidth 1 \
-focuscolor $colors(-focuscolor)
# Map disabled colors to disabledfg
ttk::style map . -foreground [list disabled $colors(-disabledfg)]
# WIDGET LAYOUTS
ttk::style layout TButton {
Button.button -children {
Button.focus -children {
Button.padding -children {
Button.label -side left -expand true
}
}
}
}
ttk::style layout Toolbutton {
Toolbutton.button -children {
Toolbutton.focus -children {
Toolbutton.padding -children {
Toolbutton.label -side left -expand true
}
}
}
}
ttk::style layout Vertical.TScrollbar {
Vertical.Scrollbar.trough -sticky ns -children {
Vertical.Scrollbar.thumb -expand true
}
}
ttk::style layout Horizontal.TScrollbar {
Horizontal.Scrollbar.trough -sticky ew -children {
Horizontal.Scrollbar.thumb -expand true
}
}
ttk::style layout TMenubutton {
Menubutton.button -children {
Menubutton.focus -children {
Menubutton.padding -children {
Menubutton.indicator -side right
Menubutton.label -side right -expand true
}
}
}
}
ttk::style layout TCombobox {
Combobox.field -sticky nswe -children {
Combobox.downarrow -side right -sticky ns -children {
Combobox.arrow -side right
}
Combobox.padding -expand true -sticky nswe -children {
Combobox.textarea -sticky nswe
}
}
}
ttk::style layout TSpinbox {
Spinbox.field -side top -sticky we -children {
Spinbox.buttons -side right -children {
null -side right -sticky {} -children {
Spinbox.uparrow -side top -sticky nse -children {
Spinbox.symuparrow -side right -sticky e
}
Spinbox.downarrow -side bottom -sticky nse -children {
Spinbox.symdownarrow -side right -sticky e
}
}
}
Spinbox.padding -sticky nswe -children {
Spinbox.textarea -sticky nswe
}
}
}
# Style elements
# Button
ttk::style element create Button.button image [list $images(button) \
pressed $images(button-active) \
active $images(button-hover) \
disabled $images(button-insensitive) \
] -border 3 -padding {3 2} -sticky ewns
# Toolbutton
ttk::style element create Toolbutton.button image [list $images(toolbutton) \
selected $images(toolbutton-active) \
pressed $images(toolbutton-active) \
{active !disabled} $images(toolbutton-hover) \
] -border 3 -padding {3 2} -sticky news
# Checkbutton
ttk::style element create Checkbutton.indicator image [list $images(check-off) \
disabled $images(check-off-insensitive) \
{active selected} $images(check-on-hover) \
{pressed selected} $images(check-on) \
active $images(check-off) \
selected $images(check-on) \
{disabled selected} $images(check-on-insensitive) \
] -width 25 -sticky w -padding {0 4 0 0}
# Radiobutton
ttk::style element create Radiobutton.indicator image [list $images(radio-off) \
disabled $images(radio-off-insensitive) \
{active selected} $images(radio-on-hover) \
{pressed selected} $images(radio-on) \
active $images(radio-off) \
selected $images(radio-on-hover) \
{disabled selected} $images(radio-on-insensitive) \
] -width 25 -sticky w -padding {0 4 0 0}
# Scrollbars
ttk::style element create Horizontal.Scrollbar.trough \
image [list $images(scroll-horiz-bg) \
disabled $images(scroll-horiz-bg-insensitive) \
]
ttk::style element create Horizontal.Scrollbar.thumb \
image [list $images(scroll-horiz-slider) \
{pressed !disabled} $images(scroll-horiz-slider-active) \
{active !disabled} $images(scroll-horiz-slider-hover) \
disabled $images(scroll-horiz-slider-insensitive) \
] -border 7 -sticky ew
ttk::style element create Vertical.Scrollbar.trough \
image [list $images(scroll-vert-bg) \
disabled $images(scroll-vert-bg-insensitive) \
]
ttk::style element create Vertical.Scrollbar.thumb \
image [list $images(scroll-vert-slider) \
{pressed !disabled} $images(scroll-vert-slider-active) \
{active !disabled} $images(scroll-vert-slider-hover) \
disabled $images(scroll-vert-slider-insensitive) \
] -border 7 -sticky ns
# Scales
ttk::style element create Horizontal.Scale.trough \
image [list $images(scale-horiz-bg) \
disabled $images(scale-horiz-bg-insensitive) \
] \
-border {10 5 10 5} -padding 0
ttk::style element create Horizontal.Scale.slider \
image [list $images(scale-slider) \
disabled $images(scale-slider-insensitive) \
active $images(scale-slider-hover) \
] \
-sticky {}
ttk::style element create Vertical.Scale.trough \
image [list $images(scale-vert-bg) \
disabled $images(scale-vert-bg-insensitive) \
] \
-border {5 10 5 10} -padding 0
ttk::style element create Vertical.Scale.slider \
image [list $images(scale-slider) \
disabled $images(scale-slider-insensitive) \
active $images(scale-slider-hover)
] \
-sticky {}
# Entry
ttk::style element create Entry.field \
image [list $images(entry) \
focus $images(entry-active) \
disabled $images(entry-insensitive)] \
-border 4 -padding {6 6} -sticky news
# LabelFrame
# ttk::style element create Labelframe.border image $images(labelframe) \
# -border 4 -padding 4 -sticky news
# Menubutton
ttk::style element create Menubutton.button \
image [list $images(button) \
pressed $images(button-active) \
active $images(button-hover) \
disabled $images(button-insensitive) \
] -sticky news -border 3 -padding {3 2}
ttk::style element create Menubutton.indicator \
image [list $images(arrow-down) \
active $images(arrow-down-hover) \
pressed $images(arrow-down-hover) \
] -sticky e -width 20
# ComboBox
ttk::style element create Combobox.field \
image [list $images(combo-entry) \
{readonly disabled} $images(combo-entry-insensitive) \
{readonly pressed} $images(combo-entry-active) \
{readonly hover} $images(combo-entry-active) \
readonly $images(combo-entry) \
{disabled} $images(combo-entry-insensitive) \
{hover} $images(combo-entry-active) \
] -border 4 -padding {6 0 0 0}
ttk::style element create Combobox.downarrow \
image [list $images(combo-button) \
pressed $images(combo-button-active) \
active $images(combo-button-hover) \
disabled $images(combo-button-insensitive) \
] -border 4 -padding {0 10 6 10}
ttk::style element create Combobox.arrow \
image [list $images(button-unshade) \
active $images(button-unshade-prelight) \
pressed $images(button-unshade-pressed) \
disabled $images(button-unshade) \
] -sticky e -width 15
# Spinbox
# ttk::style element create Spinbox.field \
# image [list $images(combo-entry) focus $images(combo-entry-active)] \
# -border 4 -padding {6 0 0 0} -sticky news
# ttk::style element create Spinbox.uparrow \
# image [list $images(up-bg) \
# pressed $images(up-bg-active) \
# active $images(up-bg-hover) \
# disabled $images(up-bg-disable) \
# ] -width 20 -border {0 2 3 0} -padding {0 5 6 2}
# ttk::style element create Spinbox.symuparrow \
# image [list $images(arrow-up-small) \
# active $images(arrow-up-small-prelight) \
# pressed $images(arrow-up-small-prelight) \
# disabled $images(arrow-up-small-insens) \
# ]
# ttk::style element create Spinbox.downarrow \
# image [list $images(down-bg) \
# pressed $images(down-bg-active) \
# active $images(down-bg-hover) \
# disabled $images(down-bg-disable) \
# ] -width 20 -border {0 0 3 2} -padding {0 2 6 5}
# ttk::style element create Spinbox.symdownarrow \
# image [list $images(arrow-down) \
# active $images(arrow-down-prelight) \
# pressed $images(arrow-down-prelight) \
# disabled $images(arrow-down-insens) \
# ]
# Notebook
# ttk::style element create Notebook.client \
# image $images(notebook) -border 1
ttk::style element create Notebook.tab \
image [list $images(notebook) \
selected $images(notebook-active) \
] -padding {4 4 4 2} -border {5 3 5 0}
# Progressbars
ttk::style element create Horizontal.Progressbar.trough \
image $images(progress-bg) -border 0 -padding 1
ttk::style element create Horizontal.Progressbar.pbar \
image $images(progress-bar) -border 0 -padding 2
ttk::style element create Vertical.Progressbar.trough \
image $images(progress-bg) -border 0 -padding 1
ttk::style element create Vertical.Progressbar.pbar \
image $images(progress-bar) -border 0
# Treeview
ttk::style element create Treeview.field \
image $images(treeview) -border 1
ttk::style element create Treeheading.cell \
image [list $images(toolbutton-hover) \
pressed $images(toolbutton-active) \
disabled $images(toolbutton-insensitive) \
active $images(toolbutton-hover)] \
-border {4 1 4 1} -padding 4 -sticky ewns
# ttk::style element create Treeitem.indicator \
# image [list $images(plus) user2 $images(empty) user1 $images(minus)] \
# -width 15 -sticky w
# Settings
ttk::style configure TButton -padding {8 4 8 4} -width -10 -anchor center
ttk::style configure TMenubutton -padding {8 4 4 4}
ttk::style configure Toolbutton -anchor center
ttk::style map TCheckbutton -background [list active $colors(-checklight)]
ttk::style configure TCheckbutton -padding 3
ttk::style map TRadiobutton -background [list active $colors(-checklight)]
ttk::style configure TRadiobutton -padding 3
ttk::style configure TNotebook -tabmargins {0 2 0 0}
ttk::style configure TNotebook.Tab -padding {6 2 6 2} -expand {0 0 2}
ttk::style map TNotebook.Tab -expand [list selected {1 2 4 2}]
ttk::style configure TSeparator -background $colors(-background)
# Treeview
ttk::style configure Treeview -background $colors(-window)
ttk::style configure Treeview.Item -padding {2 0 0 0}
ttk::style map Treeview \
-background [list selected $colors(-selectbg)] \
-foreground [list selected $colors(-selectfg)]
}
}
variable version 1.0
package provide ttk::theme::adapta $version

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 687 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Some files were not shown because too many files have changed in this diff Show More