Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: views/controls/separator.h

Issue 118065: Make separator portable. Simpler than other native controls so no wrapper int... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | views/controls/separator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef VIEWS_CONTROLS_SEPARATOR_H_ 5 #ifndef VIEWS_CONTROLS_SEPARATOR_H_
6 #define VIEWS_CONTROLS_SEPARATOR_H_ 6 #define VIEWS_CONTROLS_SEPARATOR_H_
7 7
8 #include "views/controls/native_control.h" 8 #include <string>
9
10 #include "views/view.h"
9 11
10 namespace views { 12 namespace views {
11 13
12 // The Separator class is a view that shows a line used to visually separate 14 // The Separator class is a view that shows a line used to visually separate
13 // other views. The current implementation is only horizontal. 15 // other views. The current implementation is only horizontal.
14 16
15 class Separator : public NativeControl { 17 class Separator : public View {
16 public: 18 public:
19 // The separator's class name.
20 static const char kViewClassName[];
21
17 Separator(); 22 Separator();
18 virtual ~Separator(); 23 virtual ~Separator();
19 24
20 // NativeControl overrides: 25 // Overridden from View:
21 virtual HWND CreateNativeControl(HWND parent_container); 26 virtual void Layout();
22 virtual LRESULT OnNotify(int w_param, LPNMHDR l_param);
23
24 // View overrides:
25 virtual gfx::Size GetPreferredSize(); 27 virtual gfx::Size GetPreferredSize();
28 protected:
29 virtual void ViewHierarchyChanged(bool is_add, View* parent,
30 View* child);
31 virtual std::string GetClassName() const;
26 32
27 private: 33 private:
34 void CreateNativeWrapper();
28 35
29 DISALLOW_EVIL_CONSTRUCTORS(Separator); 36 // The native view.
37 View* native_wrapper_;
38
39 DISALLOW_COPY_AND_ASSIGN(Separator);
30 }; 40 };
31 41
32 } // namespace views 42 } // namespace views
33 43
34 #endif // #define VIEWS_CONTROLS_SEPARATOR_H_ 44 #endif // VIEWS_CONTROLS_SEPARATOR_H_
OLDNEW
« no previous file with comments | « no previous file | views/controls/separator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698