Age | Commit message (Collapse) | Author |
|
The unit uses the fcl-image backend to load the image. This is slightly
slower than the native implementations for BMP and JPG. But at least now
we have PNG support too.
|
|
|
|
|
|
|
|
|
|
|
|
Refactored the TfpgTimer by introducing a TfpgBaseTimer and X11 & GDI Timer
descendants. This now allows use to add platform specific extensions to
the timer implementation.
|
|
It seems FPC only supports users.pp unit in Linux. Making this changes
allows use to compile fpGUI under OpenSolaris too!
|
|
Old behaviour was that we simply assumed the first parameter will be
the X11 -display parameter. This is just WRONG!
We now query the parameter list for the value of -display, that's if it
exists in the first place.
|
|
|
|
See the comments in the code. This fixes lots of code that checks for
the ShiftState values in key press events.
|
|
|
|
This is an initial implementation for Linux only. Currently this property
is read-only, but that alone is already very useful. Next I'll implement
the Windows support, and later the read-write support.
|
|
This component allows you to set all components on a form or embedded containers
as ReadOnly = True/False by just toggling one property on TfpgReadOnly.
|
|
These will later contain the various style implementations.
|
|
The code change in the original commit worked fine for Windows, but caused
other problems under Linux. So I have commented the original code change
for Linux until I can find a more suitable solution.
|
|
|
|
|
|
Sender: the widget the mouse was over when drop occurs.
Source: If whole DND is inside the same app, then Source is the
original Widget the DND started from.
|
|
Sender: = the widget the mouse entered and that triggered the event
Source: = if whole DND occurs in same app, then Source is the
Widget the DND action started from.
|
|
Updated the following methods by rather checking the ComponentState,
than the HasHandle result. Why? Because we want alignment and anchor
calculations to work, even before we have a window handle. Something
that happens often when using a Frame-type design for the UI.
* HandleMove()
* HandleResize()
* UpdateWindowPosition()
Due to removing the HasHandle check in UpdateWindowPosition, we had
to do the HasHandle check in each backend code instead. We don't want
to trigger API calls when we don't have a window handle yet.
|
|
* All fpGUI backends must override it as supply an implementation.
* Moved DowaitWindowMessage() implementations to the protected
section in the GDI and X11 backends.
|
|
Also made MessagesPending() a virtual abstract method in fpg_base.pas
which every fpGUI backend must supply an implementation.
|
|
Windows uses OS messages for the timer, and Linux not. So the
DoMessagePending code had to be tweaked to work for both.
I made a note of this, to see if there is a better way of doing this.
|
|
|
|
Now that the Align issues have been resolved, this work-around
is not needed any more. Commented, it now produces the exact same
events as under Windows too. This is good, obviously. :)
|
|
|
|
It's disabled by default. Enabling can be done via project level
or inside each unit at the beginning of such units.
|
|
Apparently it is good to allocate a instance, without
calling the constructor. I'm not exactly sure why, but it also
makes supporting FPC 2.5.1 a lot less messy (no casting required).
|
|
|
|
ssh://fpgui.git.sourceforge.net/gitroot/fpgui/fpgui"
Andrew is finding is training wheels with git.
This reverts commit e320dfae6add39c66ea554dbb161a844ee06db4d, reversing
changes made to 735aec8207036adb17f2174ffcb9056bee712ed3.
|
|
|
|
|
|
|
|
* This abstract method is called from TfpgWidget's AcceptDrops setter function
* Template implementation in X11
* Actual implementation in GDI
|
|
|
|
|
|
Even though this method was called, it should have checked the FDropAccepted
variable which did didn't. Now it correctly conforms to the XDND spec.
Due to the new behaviour we also have to make sure we free the TfpgDrag
instance when the drop is not accepted.
|
|
not correctly
set the ActionType parameter if the drag was not accepted.
|
|
component
|
|
If the Drop occured, but AcceptDrops = False, we must not do
any Selections conversions. This is now so.
We must still send the XdndFinished message though, so data object
can be freed, and to simply comply with XDND protocol. We now
correctly set the Accept or Decine status in the XDNDFinished
message.
|
|
This will hopefully reduce the confusion between the other
TfpgWidget.AcceptDrops property - they had too similar names.
* Applied rename changes to all other descendants too
* Updated DND demo project
|
|
If the developer did not set the AMimeChoice in OnDragEnter, then
the incorrect default could have been used. By default it
used to deflaut to 'text/plain' and never actually checked the
mime-type list to see if that exists. :-(
Now the default AMimeChoice is set the the first mime-type in
the mime-type list. This keeps with the methodology that the
mime-type list must be from most specific to least specific mime types.
|
|
The bug was that it only checked for the immediate children of
the toplevel window. It never recursed through all levels of
children finding the correct child the mouse cursor is over.
This is now fixed.
This also allows embedded frames or forms to work with DND.
|
|
There was a bug where if the component had a OnDragDrop event
handler and AcceptDrops was False, it still triggered the event.
Not any more.
|
|
I also made sure that all writeln() statements are wrapped in IFDEF's.
|
|
|
|
|
|
X11 seems too efficient, so one the initial mapping of the window
to the display, no resize event needs to occur, and it doesn't.
This screws with Align property which expects as Resize event (like
Windows GDI). So we fake a resize event.
|
|
|