Menu Framework, Double-Click + Embedded-Image

Moderator: Forum moderators

Post Reply
User avatar
glene77is
Posts: 53
Joined: Thu Aug 13, 2020 7:44 pm
Location: Univ of TN, Memphis,TN,USA
Has thanked: 39 times
Been thanked: 6 times
Contact:

Menu Framework, Double-Click + Embedded-Image

Post by glene77is »


Original v.6.1 Menu Framework,
Double-Click <button>
Embeded-Graphics <button>

Written in BASH + GTK code.

#! First Developmental version of Menu Framework is here:
#! Original MGR Menu Framework v.6.1
#! viewtopic.php?p=113057&hilit=Menu+Framework#p113057

#! Sample Instruction Version of Menu Framework series is here:
#! MCI_v.3.3_Sample-Menu_Embedded-Graphics+Double-Click
#! viewtopic.php?p=91327&hilit=embedded+image#p91327


:thumbup2: Edited 231220 :thumbup2:
Studies in : Double-Click Button + Embedded-Graphics + BASH + GTK

Attached is a little workup I did to begin exploring
the use of Double-Click Button routines
Version: 230523
Seminal idea for embedding graphics is from "june1 2012 Don White (don570)" (thanks)

This Script includes <button> for :
(1) Dumping Source code ,
(2) Dumping GUI code ,
(3) Dumping Image Code

GUI Screen includes a display (with tool-tip to show the name of each image)

This MGR script is POLISHED, and runs "STABLE" on a daily basis, in a dozen different Puppy versions.
The "INTENT" of this "Manager Menu" is:
(1) ....... to demonstrate the Double-Click GTK <button> routines.
(2) ....... to demonstrate the Embedded-Graphics GTK <button> routines.
(3) ....... to identify implementation characteristics of BASH + GTK within this project.
(4) The "Code Format Method " is chosen
. . . . . . to prohibit interaction between BASH code and GTK code .
(5) I have used an old XML code method from SCO-Unix projects
. . . . . . . which allows for complete separation of BASH code and GTK code.

(*) The BASH coding and GTK coding are standard.
The "GTK MENU" has this process:
-- All GTK menu selections are passed out via the "EXIT" GTK var,
-- All GTK menu selections fall thru to a set of BASH if [ "$EXIT" = "???" ] sub-modules
...... which are placed in bottom of script code
-- All BASH " if []" modules call a set of BASH sub-routines
...... which are placed in the top of the script code .
===> This process keeps BASH language code from interacting with GTK language code.

() The Graphic Images are EMBEDDED in the source code file and written to /root/tmp .
(
) The GTK + BASH menu method could, possibly, be used as a "frame-work" for building a new interface.
(*) Calls to external routines are "if [ -f " tested, and 'stub' controlled, as needed.
The controlling "flag" (gcSysKillProc) is set at the beginning of the script file.
:roll:
Total project is aprox. 7K lines of Bash/Gtk.

======================================================
This is Linux Puppy Distro ....... This is Free Open Source ....... So Read the Code !
======================================================

:roll:

MGR_Screen-Shot.jpg
MGR_Screen-Shot.jpg
MGR_Screen_231220-1807.jpg (171.46 KiB) Viewed 124 times

:roll:

:roll:

rc.z_MGR-5-sh-231220-1802.zip
MGR_Executable_Script_231220-1802
(55.99 KiB) Downloaded 6 times

:roll:

Check the script for "MCI" V.3.0 project
in the next POST.
"MCI" is the good example , short version,
Simple Example of Embedded Images and Double-Click Techniques
and intended to be the Model Presentation.
.......

:roll:

TESTING base:

Our script has been tested successfuly
on our 17 running Official Puppy Linux systems :

"Official" Puppy Frugal Systems via Woof-CE :

*** Developed in and Tested on these "official" Puppy 32/64 bit systems built via Woof-CE ***
####### Running Tests on 17 OS, including:
#!~ iso-KineticPup32-22.10+2_____________230604
#!~ iso-BionicPup32-8.0+30_BionicBeaver
220407
---- +1,+3,+4,+5,+10, +12, +14, +16, +17, +18 , +19, +20, +21, +23, +24, +25, +26, +27, +28, +29, +30
#!~ iso-BionicPup32-19.03-K5.9_231209.iso_231209
#!~ iso-ManticPup32-23.10+1
________231209
#!~ iso-JammyPup32-22.04+8_JammyJellyfish
22123
#!~ iso-UPupFF+D-20.12+4_Focal-Fossa
__201210
#!~ iso-UpupTahr-6.0.6-k4.1.30-uefi
____190211
#!~ iso-Slacko-7.0_DpupS7_14.2
_______220205
#!~ iso-Xenial-64_7.5_XL
______________220401
#!~ iso-S15Pup-64_22.12+1-T
___________220922
#!~ iso-Quirky_April-7.0.1F-uefi
_________200511
#!~ iso_devuanpup-9.7.0-chimaera_4.0_i386
211206
#!~ iso_BookwormPup32-23.11-B4__________231210
#!~ iso_LxPupSc-slacko-20.01+0-T-k64
__200129
#!~ iso_slacko64_14.2_32-674-bit_compatible
220227
#!~ iso_ManticPup32-23.10+1______________231209

:roll:

Last edited by glene77is on Fri Jun 07, 2024 10:09 pm, edited 36 times in total.

*Just an old Apprentice caught Tinkering in the Master's WorkShop. *
Glen Ellis ( ͡° ͜ʖ ͡° ) K4KKQ , Electronic Engineering :ugeek:
Website: http://www.GeoCities.WS/glene77is :thumbup2:
Electrical Science , Memphis, TN

User avatar
glene77is
Posts: 53
Joined: Thu Aug 13, 2020 7:44 pm
Location: Univ of TN, Memphis,TN,USA
Has thanked: 39 times
Been thanked: 6 times
Contact:

Re: Menu Framework, Double-Click + Embedded-Image Button in Bash+GTK Script

Post by glene77is »

About the Menu Framework, Double-Click + Embedded-Image Button in Bash+GTK Script
IF there is any interest in the "MGR" script project,
THEN , I can strip this down to a much smaller presentation, and include a code dump <button> .

That smaller version will be titled "MCI" .

Last edited by glene77is on Sun Apr 23, 2023 9:16 pm, edited 1 time in total.

*Just an old Apprentice caught Tinkering in the Master's WorkShop. *
Glen Ellis ( ͡° ͜ʖ ͡° ) K4KKQ , Electronic Engineering :ugeek:
Website: http://www.GeoCities.WS/glene77is :thumbup2:
Electrical Science , Memphis, TN

User avatar
wiak
Posts: 3704
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 57 times
Been thanked: 1031 times
Contact:

Re: Menu Framework, Double-Click + Embedded-Image Button in Bash+GTK Script

Post by wiak »

Looks fascinating, especially from a coder's point of view.

Is my understanding correct that you are using GTK+1? I think that might be a problem since most been using GTK+2 and moving towards newer GTK.

There may also be a problem in the amount of detail in the GUI - and working out what it is for. I commend you on the effort though. Your website also looks very interesting.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
glene77is
Posts: 53
Joined: Thu Aug 13, 2020 7:44 pm
Location: Univ of TN, Memphis,TN,USA
Has thanked: 39 times
Been thanked: 6 times
Contact:

Re: Menu Framework, Double-Click + Embedded-Image Button in Bash+GTK Script

Post by glene77is »

to WIAK, :thumbup2:
Thanks for the comment. You are right, good insight.
I think you understand the importance of your notes.
*
Your website is very interesting and well presented.
I will spend some time reading what you have done.
*

You say you visited my "website", the electronic engineering site.
I have been interested in non-linear analog circuits since 1975. It is Part of my background.
In 2016 I finally had opportunity to explore Non-Resonant Narrow-Pass-Band Audio Filters,
for use in my ham radio activities with morse code.
After reviews and commendations, I published two papers.
*
About the project, mixing BASH and GTK:
The biggest problem I have is that I think in terms of the abstract organization,
and do not always see the complexity.
I admit the MGR is a kludge, patched together , over time, while employed with other production projects.
I do not present it as an ideal solution to a generalized "master menu" project ;
it is only a presentation for study of a GTK 'master menu' and GTK Double-Click <button> and GTK Embedded-Images.
The "CTB" [ Cold Tar Backup ] is a more polished project, but still not perfectly 'finished'. Nothing ever is.

==================================================================
The next project is "MCI" and is a readable presentation ,
a "showcase" of the basic ideas in GUI and Embedded-Images
.

I suggest, that look at my next reply for "MCI" v. 3.
.
viewtopic.php?t=8908
==================================================================

Compatibility as Ubuntu upgrades their distros is something to test about: "Change and UpDate are the only constant rule".
To that end,
I run projects in 12 Puppy-"WoofCE" distros, ( as listed in the HELP page ).
#! Running Tests are done by way of a multi-boot-menu.lst. For example:
#! iso_BionicPup32-8.0+30_(BionicBeaver)_220407-2305
#! iso_JammyPup32-22.04+8_(Jammy Jellyfish)_22123-0700
#! iso_UPupFF+D-20.12+4_(Focal-Fossa)_210410
#! iso_S15Pup64-22.12+1-T_220922
#! iso_Slacko-7.0_DpupS7_14.2_(Slacko7)_220205
#! iso_Xenial64_7.5_XL-220401
#! iso_UpupTahr-6.0.6-k4.1.30-uefi-190211-0

I maintain separation between "DEV" and "TEST" and "PRODUCTION" versions, carefully, with standard name tags. and DateTimeSeconds tag.
My data subdir are on the Hard-Drive SDA, and copies are synched/updated into at least five others (SDB,SDC,SDD,et,al) daily.
This "backup" is process is written into my "TXN" re-format program , along with subdir and Date-Time-Stamps.

I have no GTK conflict "yet", on my little systems, between BASH code and GTK code.
But several projects by other contributors downloaded from Murga have given problems,
WHICH I attribute to the authors using BASH and GTK together, ( mix and mingle style ).
AS IF these are the same language system ... which they are not !

Each language (BASH and GTK) have their own interpreter, and can work together only in specified ways.
I describe the problem as BASH / GTK "InterAction" .

I have written this Double-Click + Embedded-Image <button> version , "MGR" and "MCI" trying not to mix the two languages.
For Example.
... WHEN GTK handles the maingui selection ,
..... THEN I use a GTK type function ( such as the "msg_DC_ReStart_window" ) to accomplish a limited GTK type task written in GTK dialect.
... WHEN GTK handles a maingui "Selection" or "<Action>",
...... THEN I use the GTK variable "EXIT" (<action> EXIT:guiS2F-ReStart</action>) to fall out and down to my if/fi[] BASH routines to do the non-GTK task.
....WHEN the BASH routines call BASH SubRoutines written in the top of the source, which the BASH interpreter can read and execute .
......THEN BASH sees BASH code and executes BASH code, ONLY !
I try to keep GTK interpreter reading/executing GTK code.
I try to keep BASH interpreter reading/executing BASH code.

Last edited by glene77is on Wed Aug 30, 2023 9:46 pm, edited 5 times in total.

*Just an old Apprentice caught Tinkering in the Master's WorkShop. *
Glen Ellis ( ͡° ͜ʖ ͡° ) K4KKQ , Electronic Engineering :ugeek:
Website: http://www.GeoCities.WS/glene77is :thumbup2:
Electrical Science , Memphis, TN

User avatar
wiak
Posts: 3704
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 57 times
Been thanked: 1031 times
Contact:

Re: Menu Framework, Double-Click + Embedded-Image Button in Bash+GTK Script

Post by wiak »

Yes, I miss electronics. I was brought up in that world, soldering since five years old, by my father who was an electrical and mechanical fitter and then in RAF signals core during WWIi. His Morse code speed was out of this world... a special super fast rhythm they called Baghdad Morse in signals core. Later he was strongly into ham radio, built most of his own rigs but also used old war surplus gear. I think the big very heavy receiver I had in my bedroom was CR100. As a wee kid he had me climbing trees and on top of our big old house roof helping put up long copper wire antennas. By eight maybe I was building reflex/regenerative two or three transistor radio receivers after years winding coils for crystal radios. My father became a TV repair man prior to later being chief inspector communication network for police force Lusaka, Zambia. I ended up doing degree in Electronics and worked in small design/development team producing medical ultrasound machines. Was big mix of analog and digital design work and later microprocessor assembly coding involved too. So for a long time I knew a lot about filter circuits, op amps, feedback, and related, often discrete designs since IC op amps for 10MHz and above tended to have overshoot artifacts that were difficult to filter out in practice and showed up as bright edges on ultrasound video (video processing being my part in the designs). I miss knowing all that stuff, but having moved into Internet protocol research and data comms teaching thereafter it has been forty years since Ive used any Kirchoff's Laws or worked out any op Amp feedback filter! I no longer have my design notes/semiconductor data books/and what once known like natural obvious knowledge is basically now emptied out of my brain. I feel stupid compared to back then, with only some later acquired Linux-related programming skills still slightly within my capabilities. Linux?...yes it is fine...Electronics?...that was wonderful and inspiring. Wish that was what I was still doing, but Electronics generally mass-produced cheap now, so vanished as a major pursuit for most anyway.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
glene77is
Posts: 53
Joined: Thu Aug 13, 2020 7:44 pm
Location: Univ of TN, Memphis,TN,USA
Has thanked: 39 times
Been thanked: 6 times
Contact:

Re: Menu Framework, Double-Click + Embedded-Image Button in Bash+GTK Script

Post by glene77is »

UpGraded : "MCI" v.3.0[/size][/b]
Menu Framework, Double-Click <button> and Embeded-Graphics <button>
Written in BASH + GTK code.

:thumbup2: "MCI" version: 3.2 ... Edited 230610 :thumbup2:

Project has been moved to : MCI_v.3.2_Sample-Menu_Embedded-Graphics+Double-Click
viewtopic.php?t=8908

==================================================================
"MCI" is the "showcase"
of the basic ideas in GUI and Embedded-Images
.

I suggest, that look at
.
viewtopic.php?t=8908
==================================================================

:thumbup2:
Thanks to Don White.
.......Seminal idea for embedding graphics is from "june1 2012 Don White (don570)" (thanks)
Thanks to WIAK and Rockedge
....... for thoughtful comments.
--------------------------------------------

*Just an old Apprentice caught Tinkering in the Master's WorkShop. *
Glen Ellis ( ͡° ͜ʖ ͡° ) K4KKQ , Electronic Engineering :ugeek:
Website: http://www.GeoCities.WS/glene77is :thumbup2:
Electrical Science , Memphis, TN

Post Reply

Return to “Utilities”