terminal/src/cascadia/TerminalApp
Mike Griese 8ffff8ea37
Enable dragging with the entire titlebar (#1948)
* This definitely works for getting shadow, pointy corners back

  Don't do anything in NCPAINT. If you do, you have to do everything. But the
  whole point of DwmExtendFrameIntoClientArea is to let you paint the NC area in
  your normal paint. So just do that dummy.

  * This doesn't transition across monitors.
  * This has a window style change I think is wrong.
  * I'm not sure the margins change is important.

* The window style was _not_ important

* Still getting a black xaml islands area (the HRGN) when we switch to high DPI

* I don't know if this affects anything.

* heyo this works.

  I'm not entirely sure why. But if we only update the titlebar drag region when
  that actually changes, it's a _lot_ smoother. I'm not super happy with the
  duplicated work in _UpdateDragRegion and OnSize, but checking this in in case
  I can't figure that out.

* Add more comments and cleanup

* Try making the button RightCustomContent

* * Make the MinMaxClose's drag bar's min size the same as a caption button
* Make the new tab button transparent, to see how that looks
* Make sure the TabView doesn't push the MMC off the window

* Create a TitlebarControl

  * The TitlebarControl is owned by the NCIW. It consists of a Content, DragBar,
    and MMCControl.
  * The App instatntiates a TabRowControl at runtime, and either places it in
    the UI (for tabs below titlebar) or hangs on to it, and gives it to the NCIW
    when the NCIW creates its UI.
  * When the NCIW is created, it creates a grid with two rows, one for the
    titlebar and one for the app content.
  * The MMCControl is only responsible for Min Max Close now, and is closer to
    the window implementation.
  * The drag bar takes up all the space from the right of the TabRow to the left
    of the MMC
  * Things that **DON'T** work:
    - When you add tabs, the drag bar doesn't update it's size. It only updates
      OnSize
    - The MMCControl's Min and Max buttons don't seem to work anymore.
      - They should probably just expose their OnMinimizeClick and
        OnMaximizeClick events for the Titlebar to handle minimizing and
        maximizing.
    - The drag bar is Magenta (#ff00ff) currently.
    - I'm not _sure_ we need a TabRowControl. We could probably get away with
      removing it from the UI tree, I was just being dumb before.

* Fix the MMC buttons not working

  I forgot to plumb the window handle through

* Make the titlebar less magenta

* Resize the drag region as we add/remove tabs

* Move the actual MMC handling to the TitlebarControl

* Some PR nits, fix the titlebar painting on maximize

* Put the TabRow in our XAML

* Remove dead code in preparation for review

* Horrifyingly try Gdi Plus as a solution, that is _wrong_ though

* Revert "Horrifyingly try Gdi Plus as a solution, that is _wrong_ though"

This reverts commit e038b5d921.

* This fixes the bottom border but breaks the titlebar painting

* Fix the NC bottom border

* A bunch of the more minor PR nits

* Add a MinimizeClick event to the MMCControl

  This works for Minimize. This is what I wanted to do originally.

* Add events for _all_ of the buttons, not just the Minimize btn

* Change hoe setting the titlebar content works

  Now the app triggers a callcack on the host to set the content, instead of the host querying the app.

* Move the tab row to the bottom of it's available space

* Fix the theme reloading

* PR nits from @miniksa

* Update src/cascadia/WindowsTerminal/NonClientIslandWindow.cpp

Co-Authored-By: Michael Niksa <miniksa@microsoft.com>

* This needed to be fixed, was missed in other PR nits

* runformat

  wait _what_

* Does this fix the CI build?
2019-07-18 17:21:33 -05:00
..
lib Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
App.base.h Apply a GDI region to the top level Island window to allow dragging with a single Island (#929) 2019-06-25 13:06:11 -07:00
App.cpp Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
App.h Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
App.idl Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
App.xaml Apply a GDI region to the top level Island window to allow dragging with a single Island (#929) 2019-06-25 13:06:11 -07:00
AppKeyBindings.cpp Add support for moving focus between panes with the keyboard (#1910) 2019-07-17 09:30:15 -05:00
AppKeyBindings.h Add support for moving focus between panes with the keyboard (#1910) 2019-07-17 09:30:15 -05:00
AppKeyBindings.idl Add support for moving focus between panes with the keyboard (#1910) 2019-07-17 09:30:15 -05:00
AppKeyBindingsSerialization.cpp Add support for moving focus between panes with the keyboard (#1910) 2019-07-17 09:30:15 -05:00
AppKeyBindingsSerialization.h Refactor TerminalApp and Add Tests for Xaml Content (#1164) 2019-07-15 14:27:56 -05:00
CascadiaSettings.cpp Added "Vintage" color scheme to defaults; fixes #1781 (#1901) 2019-07-10 13:52:23 +00:00
CascadiaSettings.h Switch away from Windows.Storage.ApplicationData (#1293) 2019-06-18 11:52:34 -07:00
CascadiaSettingsSerialization.cpp If we failed to get a default profile, fail the settings load (#1343) 2019-06-20 11:20:49 -07:00
ColorScheme.cpp Refactor TerminalApp and Add Tests for Xaml Content (#1164) 2019-07-15 14:27:56 -05:00
ColorScheme.h Refactor TerminalApp and Add Tests for Xaml Content (#1164) 2019-07-15 14:27:56 -05:00
GlobalAppSettings.cpp Double and Triple Click Selection (#1197) 2019-07-11 16:06:18 -07:00
GlobalAppSettings.h Double and Triple Click Selection (#1197) 2019-07-11 16:06:18 -07:00
KeyChordSerialization.cpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
KeyChordSerialization.h Support remapping keybindings (#748) 2019-05-21 09:26:04 -05:00
MinMaxCloseControl.cpp Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
MinMaxCloseControl.h Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
MinMaxCloseControl.idl Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
MinMaxCloseControl.xaml Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
packages.config Refactor TerminalApp and Add Tests for Xaml Content (#1164) 2019-07-15 14:27:56 -05:00
Pane.cpp Add support for moving focus between panes with the keyboard (#1910) 2019-07-17 09:30:15 -05:00
Pane.h Add support for moving focus between panes with the keyboard (#1910) 2019-07-17 09:30:15 -05:00
pch.cpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
pch.h Refactor TerminalApp and Add Tests for Xaml Content (#1164) 2019-07-15 14:27:56 -05:00
Profile.cpp Refactor TerminalApp and Add Tests for Xaml Content (#1164) 2019-07-15 14:27:56 -05:00
Profile.h Add support for setting a profile's tab title (#1358) 2019-07-02 10:09:22 -07:00
Tab.cpp Add support for moving focus between panes with the keyboard (#1910) 2019-07-17 09:30:15 -05:00
Tab.h Add support for moving focus between panes with the keyboard (#1910) 2019-07-17 09:30:15 -05:00
TabRowControl.cpp Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TabRowControl.h Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TabRowControl.idl Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TabRowControl.xaml Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TerminalApp.def Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
TerminalApp.vcxproj Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TerminalPage.cpp Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TerminalPage.h Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TerminalPage.idl Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TerminalPage.xaml Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TitlebarControl.cpp Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TitlebarControl.h Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TitlebarControl.idl Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
TitlebarControl.xaml Enable dragging with the entire titlebar (#1948) 2019-07-18 17:21:33 -05:00
Utils.cpp Switch to jsoncpp as our json library (#1005) 2019-06-04 16:55:27 -05:00
Utils.h Switch to jsoncpp as our json library (#1005) 2019-06-04 16:55:27 -05:00