diff options
| author | crupest <crupest@outlook.com> | 2018-10-06 23:49:17 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2018-10-06 23:49:17 +0800 |
| commit | 2261a4bc348a6017a0f31233f969bdf31ae35679 (patch) | |
| tree | ccdc237b84423c9564458df3fae036f08815dda6 /src/application.h | |
| parent | beb6cfa6b3492f5a9d89ba99c03358c22598e7aa (diff) | |
| download | cru-2261a4bc348a6017a0f31233f969bdf31ae35679.tar.gz cru-2261a4bc348a6017a0f31233f969bdf31ae35679.tar.bz2 cru-2261a4bc348a6017a0f31233f969bdf31ae35679.zip | |
Add debug layout visual effects.
Diffstat (limited to 'src/application.h')
| -rw-r--r-- | src/application.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/application.h b/src/application.h index 106e7171..b371c8f9 100644 --- a/src/application.h +++ b/src/application.h @@ -34,6 +34,15 @@ namespace cru float half_caret_width; }; +#ifdef CRU_DEBUG_LAYOUT + struct DebugLayoutResource + { + Microsoft::WRL::ComPtr<ID2D1Brush> out_border_brush; + Microsoft::WRL::ComPtr<ID2D1Brush> margin_brush; + Microsoft::WRL::ComPtr<ID2D1Brush> padding_brush; + }; +#endif + class GodWindow : public Object { public: @@ -111,10 +120,10 @@ namespace cru return caret_info_; } -#ifdef CRU_DEBUG_DRAW_CONTROL_BORDER - Microsoft::WRL::ComPtr<ID2D1Brush> GetDebugBorderBrush() const +#ifdef CRU_DEBUG_LAYOUT + const DebugLayoutResource* GetDebugLayoutResource() const { - return debug_border_brush_; + return &debug_layout_resource_; } #endif @@ -128,8 +137,8 @@ namespace cru std::unique_ptr<GodWindow> god_window_; -#ifdef CRU_DEBUG_DRAW_CONTROL_BORDER - Microsoft::WRL::ComPtr<ID2D1Brush> debug_border_brush_; +#ifdef CRU_DEBUG_LAYOUT + DebugLayoutResource debug_layout_resource_; #endif CaretInfo caret_info_; |
