2018-05-22 08:08:27 +00:00
|
|
|
// Copyright (c) 2018 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2019-06-19 20:56:58 +00:00
|
|
|
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_
|
|
|
|
#define SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_
|
2018-05-22 08:08:27 +00:00
|
|
|
|
2018-05-23 04:30:57 +00:00
|
|
|
#include "native_mate/handle.h"
|
2019-06-19 20:46:59 +00:00
|
|
|
#include "shell/browser/api/views/atom_api_layout_manager.h"
|
2018-05-22 08:08:27 +00:00
|
|
|
#include "ui/views/layout/box_layout.h"
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
namespace electron {
|
2018-05-22 08:08:27 +00:00
|
|
|
|
|
|
|
namespace api {
|
|
|
|
|
2018-05-23 04:30:57 +00:00
|
|
|
class View;
|
|
|
|
|
2018-05-22 08:08:27 +00:00
|
|
|
class BoxLayout : public LayoutManager {
|
|
|
|
public:
|
|
|
|
static mate::WrappableBase* New(mate::Arguments* args,
|
|
|
|
views::BoxLayout::Orientation orientation);
|
|
|
|
|
|
|
|
static void BuildPrototype(v8::Isolate* isolate,
|
|
|
|
v8::Local<v8::FunctionTemplate> prototype);
|
|
|
|
|
2018-05-23 04:30:57 +00:00
|
|
|
void SetFlexForView(mate::Handle<View> view, int flex);
|
|
|
|
|
2018-05-22 08:08:27 +00:00
|
|
|
protected:
|
|
|
|
explicit BoxLayout(views::BoxLayout::Orientation orientation);
|
|
|
|
~BoxLayout() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(BoxLayout);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace api
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
} // namespace electron
|
2018-05-22 08:08:27 +00:00
|
|
|
|
2019-06-19 20:56:58 +00:00
|
|
|
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_
|