summaryrefslogtreecommitdiff
path: root/LibGUI/GWindow.h
AgeCommit message (Collapse)Author
2019-03-24WindowServer+LibGUI: Implement automatic cursor tracking.Andreas Kling
When a mouse button is pressed inside a window, put that window into an automatic mouse tracking state where all mouse events are sent to that window until all mouse buttons are released. This might feel even better if it only cared about the mouse buttons you actually pressed while *inside* the windows to get released, I don't know. I'll have to use it for a while and see how it's like.
2019-03-20FileManager: Add ability to create new directories.Andreas Kling
2019-03-19LibGUI: More work on GInputBox.Andreas Kling
- If the GInputBox has a parent and the parent is a GWindow, center the input box window within the parent window. This looks quite nice. - Stop processing events in a nested event loop immediately after it's been asked to quit. - Fix GWidget::parent_widget() behavior for non-widget parents.
2019-03-19WindowServer: Add special treatment for modal windows.Andreas Kling
While a WSClientConnection has a modal window showing, non-modal windows belonging to that client are not sent any events.
2019-03-19LibGUI: Implement nested event loops to support dialog boxes.Andreas Kling
This patch adds a simple GMessageBox that can run in a nested event loop. Here's how you use it: GMessageBox box("Message text here", "Message window title"); int result = box.exec(); The next step is to make the WindowServer respect the modality flag of these windows and prevent interaction with other windows in the same process until the modal window has been closed.
2019-03-17Add client-side double buffering of window backing stores.Andreas Kling
This prevents flicker and looks rather good. The main downside is that resizing gets even more sluggish. That's the price we pay for now.
2019-03-15IRCClient: Start working on a simple graphical IRC client.Andreas Kling
This will be a nice way to exercise both LibGUI and the TCP/IP support. :^)
2019-02-21Add concept of size increments to windowing system.Andreas Kling
Use this to implement incremental resizing for Terminal so that we only ever resize to fit a perfect number of rows and columns. This is very nice. :^)
2019-02-20Rework the rendering model so that clients instantiate backing stores.Andreas Kling
This makes interactive resizing work a lot better, althought it's still not perfect. There are still glitches and unpleasant flashes of zeroed memory.
2019-02-20LibGUI: Implement enter/leave events (with WindowServer support.)Andreas Kling
Windows now learn when the mouse cursor leaves or enters them. Use this to implement GWidget::{enter,leave}_event() and use that to implement the CoolBar button effect. :^)
2019-02-19WindowServer: Support windows with alpha channels. And per-WSWindow opacity.Andreas Kling
This patch also adds a Format concept to GraphicsBitmap. For now there are only two formats: RGB32 and RGBA32. Windows with alpha channel have their backing stores created in the RGBA32 format. Use this to make Terminal windows semi-transparent for that comfy rice look. There is one problem here, in that window compositing overdraw incurs multiple passes of blending of the same pixels. This leads to a mismatch in opacity which is obviously not good. I will work on this in a later patch. The alpha blending is currently straight C++. It should be relatively easy to optimize this using SSE instructions. For now I'm just happy with the cute effect. :^)
2019-02-11LibGUI: Add GWindow::move_to().Andreas Kling
2019-02-10LibGUI: Coalesce update rects at the GWindow level.Andreas Kling
2019-02-10Port Terminal to LibGUI.Andreas Kling
To facilitate listening for action on arbitrary file descriptors, I've added a GNotifier class. It's quite simple but very useful: GNotifier notifier(fd, GNotifier::Read); notifier.on_ready_to_read = [this] (GNotifier& fd) { // read from fd or whatever else you like :^) }; The callback will get invoked by GEventLoop when select() says we have something to read on the fd.
2019-02-08Launcher: Factor the app buttons into a LaunchButton class.Andreas Kling
Added some LibGUI helpers while I'm at it.
2019-02-05Add a simple close button ("X") to windows.Andreas Kling
Clicking the button generates a WindowCloseRequest event which the client app then has to deal with. The default behavior for GWindow is to close() itself. I also added a flag, GWindow::should_exit_event_loop_on_close() which does what it sounds like it does. This patch exposed some bugs in GWindow and GWidget teardown.
2019-01-30LibGUI: Implement destroying individual windows without exiting the process.Andreas Kling
2019-01-27Make buttons unpress when the cursor leaves the button rect.Andreas Kling
Implement this functionality by adding global cursor tracking. It's currently only possible for one GWidget per GWindow to track the cursor.
2019-01-26LibGUI: Don't consider a GWidget focused if the window is inactive.Andreas Kling
2019-01-26LibGUI: Flesh out focus implementation and more GTextBox work.Andreas Kling
2019-01-26LibGUI: Start bringing up GTextBox in the standalone world.Andreas Kling
2019-01-26Refactor GUI rendering model to be two-phased.Andreas Kling
Instead of clients painting whenever they feel like it, we now ask that they paint in response to a paint message. After finishing painting, clients notify the WindowServer about the rect(s) they painted into and then flush eventually happens, etc. This stuff leaves us with a lot of badly named things. Need to fix that.
2019-01-24Let userland retain the window backing store while drawing into it.Andreas Kling
To start painting, call: gui$get_window_backing_store() Then finish up with: gui$release_window_backing_store() Process will retain the underlying GraphicsBitmap behind the scenes. This fixes racing between the WindowServer and GUI clients. This patch also adds a WSWindowLocker that is exactly what it sounds like.
2019-01-20LibGUI: Only redraw the dirty rect in GWidget.Andreas Kling
There is some trouble here with the asynchronous nature of WindowServer and the single per-window backing store we're drawing into. If we start repainting a widget with a pending invalidation, that invalidation might get flushed by the WindowServer mid-paint.
2019-01-20Start bringing up LibGUI properly (formerly Widgets.)Andreas Kling
2019-01-20Rename all the LibGUI classes to GClassName.Andreas Kling