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

Side by Side Diff: ash/ime/candidate_view.h

Issue 258463002: Introduces 'highlighted' property to candidate view. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 8 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 | « ash/ash.gyp ('k') | ash/ime/candidate_view.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 ASH_IME_CANDIDATE_VIEW_H_ 5 #ifndef ASH_IME_CANDIDATE_VIEW_H_
6 #define ASH_IME_CANDIDATE_VIEW_H_ 6 #define ASH_IME_CANDIDATE_VIEW_H_
7 7
8 #include "ash/ash_export.h" 8 #include "ash/ash_export.h"
9 #include "base/gtest_prod_util.h" 9 #include "base/gtest_prod_util.h"
10 #include "ui/base/ime/candidate_window.h" 10 #include "ui/base/ime/candidate_window.h"
(...skipping 15 matching lines...) Expand all
26 int* candidate_width); 26 int* candidate_width);
27 27
28 void SetWidths(int shortcut_width, 28 void SetWidths(int shortcut_width,
29 int candidate_width); 29 int candidate_width);
30 30
31 void SetEntry(const ui::CandidateWindow::Entry& entry); 31 void SetEntry(const ui::CandidateWindow::Entry& entry);
32 32
33 // Sets infolist icon. 33 // Sets infolist icon.
34 void SetInfolistIcon(bool enable); 34 void SetInfolistIcon(bool enable);
35 35
36 void SetHighlighted(bool highlighted);
37
36 private: 38 private:
37 friend class CandidateWindowViewTest; 39 friend class CandidateWindowViewTest;
38 FRIEND_TEST_ALL_PREFIXES(CandidateWindowViewTest, ShortcutSettingTest); 40 FRIEND_TEST_ALL_PREFIXES(CandidateWindowViewTest, ShortcutSettingTest);
39 41
40 // Overridden from views::CustomButton: 42 // Overridden from views::CustomButton:
41 virtual void StateChanged() OVERRIDE; 43 virtual void StateChanged() OVERRIDE;
42 44
43 // Overridden from View: 45 // Overridden from View:
44 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; 46 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
45 virtual void Layout() OVERRIDE; 47 virtual void Layout() OVERRIDE;
46 virtual gfx::Size GetPreferredSize() OVERRIDE; 48 virtual gfx::Size GetPreferredSize() OVERRIDE;
47 49
48 // The orientation of the candidate view. 50 // The orientation of the candidate view.
49 ui::CandidateWindow::Orientation orientation_; 51 ui::CandidateWindow::Orientation orientation_;
50 52
51 // Views created in the class will be part of tree of |this|, so these 53 // Views created in the class will be part of tree of |this|, so these
52 // child views will be deleted when |this| is deleted. 54 // child views will be deleted when |this| is deleted.
53 55
54 // The shortcut label renders shortcut numbers like 1, 2, and 3. 56 // The shortcut label renders shortcut numbers like 1, 2, and 3.
55 views::Label* shortcut_label_; 57 views::Label* shortcut_label_;
56 // The candidate label renders candidates. 58 // The candidate label renders candidates.
57 views::Label* candidate_label_; 59 views::Label* candidate_label_;
58 // The annotation label renders annotations. 60 // The annotation label renders annotations.
59 views::Label* annotation_label_; 61 views::Label* annotation_label_;
62 // The infolist icon.
63 views::View* infolist_icon_;
60 64
61 int shortcut_width_; 65 int shortcut_width_;
62 int candidate_width_; 66 int candidate_width_;
63 67 bool highlighted_;
64 // The infolist icon.
65 views::View* infolist_icon_;
66 68
67 DISALLOW_COPY_AND_ASSIGN(CandidateView); 69 DISALLOW_COPY_AND_ASSIGN(CandidateView);
68 }; 70 };
69 71
70 } // namespace ime 72 } // namespace ime
71 } // namespace ash 73 } // namespace ash
72 74
73 #endif // ASH_IME_CANDIDATE_VIEW_H_ 75 #endif // ASH_IME_CANDIDATE_VIEW_H_
OLDNEW
« no previous file with comments | « ash/ash.gyp ('k') | ash/ime/candidate_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698