Hallo Fred van Stappen,
vous ecrit au Sat, 17 Sep 2022 11:04:55 +0000:
> >> So I did make public onmouseevent for mseSimpleWidget:
...
> >> And recompiled ideU with it.
>
> > So it's useable with ideU only, not with the regular mseide?
>
> No, msewidgets.pas is part of msegui code.
Yes, I realize that - but if you do NOT recompile the regular ide, then
you will not have direct access to the additional field through it,
will you?
> But to make it usable with MSEide you need to re-compile mseide with
> updated msewidgets.pas.
>
> ...
> >> ..., now the rounded clock can move.
...
> > Are you restricted to use Windows, perhaps?
>
> Hum, I dont have Windows installed, I have to check if it works on
> Windows too.
Please check it out if you can - I don't have a really useable Windows
installed, just a couple of incomplete oldish versios (W7 as the most
recent), so I really cannot test that. Oh, but you said, you don't have
Windows installed either. Don't burden you with it, if there's no
other reason to do. I DO have access - sometimes - to a machine where
a W10 is running at a customer's site. There I could probaely check
that out, although it may take a little while.
BTW, with your mouse move method, "the rounded clock can move" only if
you grab it at the in the right area, i.e. the area of the "Panel". It
will NOT work within the display fields, because these don't expose a
"simplwidget". You can make the clock field sensitive as well, though,
by assigning the move method to the field "Rahmen" also. The date field
would have to be overlaid by a transparent "simplewidget" though, to
make that work.
> >> What do you think to make onmouseevent public for SimpleWidget?
Well, seen that way, possibly not a really good idea.
I think anyway there should be an option (it it not already exists)
to allow for a window to evaluate these kinds of events BEFORE passing
them on to its client windows. In fact, that's how it's handled by most
other GUI frameworks, as far as I know.
But anyway, I did implement your function, but couldn't resist to
"optimize" it a bit. In the course of doing so, I found that no vector
operations exist for points, which would often be handy for working
with these. So I created a couple, as given below.
Now, that's my "optimized" version of your mouse move method:
___________________________________________________
// Arithhmetic operator overloading for Points should really exist:
OPERATOR + (P1, P2: PointTy): PointTy;
BEGIN
Result.x:= P1.x+ P2.x;
Result.y:= P1.y+ P2.y;
END;
OPERATOR - (P1, P2: PointTy): PointTy;
BEGIN
Result.x:= P1.x- P2.x;
Result.y:= P1.y- P2.y;
END;
procedure tclockworkfo.mouseevent (const sender: twidget;
var ainfo: mouseeventinfoty);
// assigned to Panel-background
begin
with ainfo do
case eventkind of
ek_mousemove:
if shiftstate = [ss_left] then
self.pos:= self.pos+ pos- oripoint;
ek_buttonpress:
begin
oripoint:= ainfo.pos;
cursor:= cr_pointinghand;
end;
ek_buttonrelease:
cursor:= cr_default;
end;
end;
___________________________________________________
BTW, the "ispressed" variable isn't really neccessary, as long as no
events get lost. After all, the state of the mouse button can always
be evaluated through the field "shiftstate" of the "ainfo" parameter,
which is provided anyway. I changed the chain of "if" statements to a
"case", because there's no point evaluating the other conditions if
the active one has been processed. This appears to work flawlessly.
> >CAN msegui still claim any popularity?
>
> Difficult to say.
[GitHub]
> It gives a graphic of last 15 days traffic.
> The average is +- 80 new visitors each 2 weeks.
> And for september +-100 new visitors for 2 first weeks.
> I agree it is not many but still > 0. ;-)
And how many contributors are there still? It seems this list (that I
use through a mailing-list-to-news-group converter system) seems pretty
lonesome now, with you and me the only users left. (It could probabely
be shut down, if these exchanges were switched over to direkt email
correspondence.)
Do you still get help requests of users or complaints about problems
or missing features?
In any case, it might be required to make some attempts at advertising
mseide-msegui, like is done for Lazarus. There seem to be no "self-
runners" possible any more, these days, being them as ingenious as they
might ever be.
> > BTW, the MSEclock on my web site isn't "finished" in any way.
>
> Yes, of course, but imho, it will be a nice demo to show how
> shaped-form, multi-languages, ... work.
Maybe, and I'm about to update the stuff anyway and plan to provide a
new version "soon". By now, the main road block is the new font dialog,
where I have't yet figured out a good way to handle the font attributes,
like bold or italic or so. Martin has done it in a quite ideosyncratic
way, and the font list recovered by the "fontlist" unit doesn't provide
any means of consistent classification, e.g. fonts may be anything of
italic, cursive, slanted or oblique, they can be normal, standard or
medium, and there are even different language denominations.
Probabely I'll throw out the selection boxes altogether and just
provide a list of font specific modifiers, as is done by some other font
selectors I know of. After all, I cannot see any sensible use for the
attributes "strikeout" and "blank", and only barely so for "underline".
On the other hand, it would be quite desireable to enlarge the sample
display field and to add an "apply" button (and event).
Along these lines, there will be some new stuff coming.
--
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk