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

Side by Side Diff: ui/uilib/static_line.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « ui/uilib/static_ex.cc ('k') | ui/uilib/static_line.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2006-2009 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 // ========================================================================
15
16 //
17 // static_line.h
18
19 #ifndef OMAHA_UI_UILIB_STATIC_LINE_H_
20 #define OMAHA_UI_UILIB_STATIC_LINE_H_
21
22 #include <atlstr.h>
23 #include <atltypes.h>
24 #include <vector>
25 #include "base/basictypes.h"
26
27 class Node;
28
29 class StaticLine {
30 public:
31 StaticLine();
32 virtual ~StaticLine();
33
34 int AdjustBaseLine(int base_line);
35 int AdjustHeight(int height);
36
37 int base_line() const { return base_line_; }
38 int height() const { return height_; }
39
40 void AddNode(Node* node, int start, int end, int height, int base_line,
41 int width);
42 void AddEllipses() { elipses_ = true; }
43
44 bool IsUrlUnderMouse(CPoint point, CString* action);
45
46 int Paint(HDC hdc, int left, int right, int y, DWORD window_style,
47 int ellipsis);
48
49 protected:
50 int HitTest(CPoint point);
51
52 int base_line_;
53 int height_;
54
55 struct Nodes {
56 Node* node;
57 int start; // first char to output
58 int length; // number of chars
59 int height;
60 int base_line;
61 int width;
62 CRect rect;
63
64 Nodes(Node* node, int start, int length, int height, int base_line,
65 int width)
66 : node(node), start(start), length(length), height(height),
67 base_line(base_line), width(width), rect(0, 0, 0, 0) {}
68 };
69
70 std::vector<Nodes> nodes_;
71 bool elipses_;
72
73 DISALLOW_EVIL_CONSTRUCTORS(StaticLine);
74 };
75
76 #endif // OMAHA_UI_UILIB_STATIC_LINE_H_
OLDNEW
« no previous file with comments | « ui/uilib/static_ex.cc ('k') | ui/uilib/static_line.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698