diff options
Diffstat (limited to 'chrome/views')
-rw-r--r-- | chrome/views/resize_corner.cc | 33 | ||||
-rw-r--r-- | chrome/views/resize_corner.h | 28 | ||||
-rw-r--r-- | chrome/views/views.vcproj | 8 |
3 files changed, 69 insertions, 0 deletions
diff --git a/chrome/views/resize_corner.cc b/chrome/views/resize_corner.cc new file mode 100644 index 0000000..97925ca --- /dev/null +++ b/chrome/views/resize_corner.cc @@ -0,0 +1,33 @@ +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/views/resize_corner.h" + +#include <vssym32.h> + +#include "base/gfx/native_theme.h" +#include "chrome/common/gfx/chrome_canvas.h" + +namespace views { + +ResizeCorner::ResizeCorner() { +} + +ResizeCorner::~ResizeCorner() { +} + +void ResizeCorner::Paint(ChromeCanvas* canvas) { + // Paint the little handle. + RECT widgetRect = { 0, 0, width(), height() }; + HDC hdc = canvas->beginPlatformPaint(); + gfx::NativeTheme::instance()->PaintStatusGripper(hdc, + SP_GRIPPER, + 0, + 0, + &widgetRect); + canvas->endPlatformPaint(); +} + +} // namespace views + diff --git a/chrome/views/resize_corner.h b/chrome/views/resize_corner.h new file mode 100644 index 0000000..ed02216 --- /dev/null +++ b/chrome/views/resize_corner.h @@ -0,0 +1,28 @@ +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_VIEWS_RESIZE_CORNER_H__ +#define CHROME_VIEWS_RESIZE_CORNER_H__ + +#include "chrome/views/view.h" + +namespace views { + +// Simple drawing of a resize corner. Has no functionality. +class ResizeCorner : public View { + public: + ResizeCorner(); + virtual ~ResizeCorner(); + + // View + virtual void Paint(ChromeCanvas* canvas); + + private: + DISALLOW_EVIL_CONSTRUCTORS(ResizeCorner); +}; + +} // namespace views + +#endif // CHROME_VIEWS_RESIZE_CORNER_H__ + diff --git a/chrome/views/views.vcproj b/chrome/views/views.vcproj index 9656303..6d5ce3d 100644 --- a/chrome/views/views.vcproj +++ b/chrome/views/views.vcproj @@ -466,6 +466,14 @@ > </File> <File + RelativePath=".\resize_corner.cc" + > + </File> + <File + RelativePath=".\resize_corner.h" + > + </File> + <File RelativePath=".\root_view.cc" > </File> |