English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 27 August 2023, 21:52   #41
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,248
Quote:
Originally Posted by meynaf View Post
I pick the pens at startup, store them in some array, and end of story. Shouldn't be long.
If you would dare a look, they are already in an array, namely that of the DrawInfo. The long part is all the move/draw/setpen operations.


Quote:
Originally Posted by meynaf View Post
There is more than just a draw state. There are also variants of the bitmap button. Some don't have a border (simple icons).
Again, please have a look at the code. There is a state information associated to each gadget you can use. That state is all intuition knows about the state of the object. You can of course add your own methods and extend the state. You need one method that sets the extended state such that IM_DRAW can pick it up along with the intuition state.



Quote:
Originally Posted by aros-sg View Post

Now, doing that from inside a boopsi should be fun, huh ?

That should also be possible, except that I haven't done that. Again, I'm not an expert in boopsis.
Thomas Richter is offline  
Old 27 August 2023, 22:23   #42
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,335
Quote:
Originally Posted by Thomas Richter View Post
If you would dare a look, they are already in an array, namely that of the DrawInfo. The long part is all the move/draw/setpen operations.
I know this, but i mean, sometimes the pens i want are not present (f.e. color for cursor in edit box).


Quote:
Originally Posted by Thomas Richter View Post
Again, please have a look at the code. There is a state information associated to each gadget you can use. That state is all intuition knows about the state of the object. You can of course add your own methods and extend the state. You need one method that sets the extended state such that IM_DRAW can pick it up along with the intuition state.
All state is in a structure of mine and i'd rather not duplicate it.


Quote:
Originally Posted by Thomas Richter View Post
That should also be possible, except that I haven't done that. Again, I'm not an expert in boopsis.
If an expert in boopsis is needed, i'd better do otherwise.
meynaf is offline  
Old 27 August 2023, 23:49   #43
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,248
Quote:
Originally Posted by meynaf View Post
I know this, but i mean, sometimes the pens i want are not present (f.e. color for cursor in edit box).
That is up to the edit box to decide. Maybe you want to look into the intuition includes.


Quote:
Originally Posted by meynaf View Post
All state is in a structure of mine and i'd rather not duplicate it.
Then use your structure if you think its better. I'm rather using the intuition pens as those are adjustable by the user and thus under control of the system preferences.



Quote:
Originally Posted by meynaf View Post
If an expert in boopsis is needed, i'd better do otherwise.

Ah, so you do not want to read documentation then? Look, I haven't attempted to approach this problem just for you, but if I would need to do, I would invest some time and read into it. So far, I haven't had this particular problem.



But again, I guess we both know that you didn't want to in first place, so I was (again) wasting my time. If you don't want to learn, why do you ask in first place - it's probably the last time I'll dig out code for you.
Thomas Richter is offline  
Old 28 August 2023, 08:45   #44
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,335
Quote:
Originally Posted by Thomas Richter View Post
That is up to the edit box to decide. Maybe you want to look into the intuition includes.
The edit box doesn't 'decide'. It just gets background color and do video inversion. Same story for text under cursor.


Quote:
Originally Posted by Thomas Richter View Post
Then use your structure if you think its better. I'm rather using the intuition pens as those are adjustable by the user and thus under control of the system preferences.
Hey, my structure is filled with the intuition pens, i'm not using arbitrary colors !
It's just that there are no dedicated pens for many things.
Another issue is that the Palette prefs program sets these colors only among 8 even if screen has more.


Quote:
Originally Posted by Thomas Richter View Post
Ah, so you do not want to read documentation then? Look, I haven't attempted to approach this problem just for you, but if I would need to do, I would invest some time and read into it. So far, I haven't had this particular problem.

But again, I guess we both know that you didn't want to in first place, so I was (again) wasting my time. If you don't want to learn, why do you ask in first place - it's probably the last time I'll dig out code for you.
Look, i've just come here to solve a small behavioral issue and you came asking me to redo everything ! And of course, not at all to make it simpler.
Do not be surprised then if i don't want to dig into docs.
meynaf is offline  
Old 28 August 2023, 11:35   #45
Thomas Richter
Registered User
 
Join Date: Jan 2019
Location: Germany
Posts: 3,248
Quote:
Originally Posted by meynaf View Post
The edit box doesn't 'decide'. It just gets background color and do video inversion. Same story for text under cursor.
That *is* a decision.



Quote:
Originally Posted by meynaf View Post

It's just that there are no dedicated pens for many things.
Another issue is that the Palette prefs program sets these colors only among 8 even if screen has more.
Because intuition only allocates 8 pens at most. The first 4, and the last 4. With screen depth as limited as on the Amiga due to available chip ram and ram bandwidth, requiring more pens for the GUI is not such a great idea.



Quote:
Originally Posted by meynaf View Post
Look, i've just come here to solve a small behavioral issue and you came asking me to redo everything ! And of course, not at all to make it simpler.
Do not be surprised then if i don't want to dig into docs.

Look, there is the operating system to do gadgets and GUI for you, and you wanted to know how to do it right. This is the right way of doing things - using the services of the system, even if it means that you need to learn something (what is so bad about that in first place?). Otherwise, we can stop right here. Kick 2.0 was a "waste" as it alos introduced new functions and new concepts such as hooks and taglists - what a waste of resources, you can do that yourself, too....
Thomas Richter is offline  
Old 28 August 2023, 11:49   #46
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,335
Quote:
Originally Posted by Thomas Richter View Post
That *is* a decision.
If you say so.


Quote:
Originally Posted by Thomas Richter View Post
Because intuition only allocates 8 pens at most. The first 4, and the last 4. With screen depth as limited as on the Amiga due to available chip ram and ram bandwidth, requiring more pens for the GUI is not such a great idea.
Requiring is something, merely being able to use is something else.
I'm not saying it should have been mandatory, just possible.



Quote:
Originally Posted by Thomas Richter View Post
Look, there is the operating system to do gadgets and GUI for you, and you wanted to know how to do it right.
Who decides what's "right" ?
Anyway, no, i didn't ask "how to do it right". I asked how to have the gadget down locking window effect, without an actual gadget. Do you at least know how intuition knows it has to defer window activation ?


Quote:
Originally Posted by Thomas Richter View Post
This is the right way of doing things - using the services of the system, even if it means that you need to learn something (what is so bad about that in first place?).
What's bad here is learning something that will at the end not be able to do the job and end up useless. Sorry, i have better things to do of my time.


Quote:
Originally Posted by Thomas Richter View Post
Otherwise, we can stop right here. Kick 2.0 was a "waste" as it alos introduced new functions and new concepts such as hooks and taglists - what a waste of resources, you can do that yourself, too....
There is a big difference. Sometimes the OS is up to the job, but sometimes it is not. When it's not, i do things myself. I started with regular gadgets, then gadtools, then boopsi - none did it. Simple.
meynaf is offline  
Old 04 September 2023, 09:58   #47
meynaf
son of 68k
 
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,335
Another issue i've run into : found no access to alternate dimensions (see ZipWindow) once the window is open. No way to read them, no way to change them.

So, what is the "do it right" method when we want next opening of same window to restore both its positions and sizes as set by the user when using it ?


EDIT:
Found how to read them (indirectly). Check WFLG_ZOOMED when getting size/move event.
But, does not solve the problem that there is no (documented) way to change them - which is necessary to take the borders into account (right and bottom may change due to presence of size gadget).

Last edited by meynaf; 04 September 2023 at 11:06.
meynaf is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove/hide any gadget from window (gadtools) peceha Coders. System 9 18 September 2019 08:45
How to add an Iconify-Gadget to a Window? AGS Coders. System 5 15 January 2014 15:41
I am locking for a game MuffinMan Looking for a game name ? 3 29 August 2010 03:12
Sinbad WHD locking up Kurtz project.Killergorilla's WHD packs 15 23 March 2009 12:33
Gadget/Layout.gadget V44 ruliovega support.Apps 6 02 January 2006 11:50

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:18.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07942 seconds with 13 queries