blob: 0a503ea50ee05f1f69db7ceb4903fbca9ea0f7d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
// Copyright (c) 2011 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 "views/examples/link_example.h"
#include "base/utf_string_conversions.h"
#include "views/controls/link.h"
#include "views/layout/fill_layout.h"
#include "views/view.h"
namespace examples {
LinkExample::LinkExample(ExamplesMain* main)
: ExampleBase(main, "Link") {
}
LinkExample::~LinkExample() {
}
void LinkExample::CreateExampleView(views::View* container) {
link_ = new views::Link(ASCIIToUTF16("Click me!"));
link_->set_listener(this);
container->SetLayoutManager(new views::FillLayout);
container->AddChildView(link_);
}
void LinkExample::LinkClicked(views::Link* source, int event_flags) {
PrintStatus("Link clicked");
}
} // namespace examples
|