diff options
| author | ruki <[email protected]> | 2018-01-23 00:42:05 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-01-22 22:12:32 +0800 |
| commit | 6d116a4bc1b58f660a60ff206c6c57ee9c939805 (patch) | |
| tree | 710e77bafaff1b35198e9f960558986f6ef9402b /tests/ui/mconfdialog.lua | |
| parent | 9e9946b8744cec7941cc9a0fd244a517231155a9 (diff) | |
add menuconf and mconfdialog
Diffstat (limited to 'tests/ui/mconfdialog.lua')
| -rw-r--r-- | tests/ui/mconfdialog.lua | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/ui/mconfdialog.lua b/tests/ui/mconfdialog.lua new file mode 100644 index 000000000..2eca8dc2f --- /dev/null +++ b/tests/ui/mconfdialog.lua @@ -0,0 +1,54 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015 - 2018, TBOOX Open Source Group. +-- +-- @author ruki +-- @file mconfdialog.lua +-- + +-- imports +import("core.ui.log") +import("core.ui.rect") +import("core.ui.view") +import("core.ui.label") +import("core.ui.event") +import("core.ui.mconfdialog") +import("core.ui.application") + +-- the demo application +local demo = application() + +-- init demo +function demo:init() + + -- init name + application.init(self, "demo") + + -- init background + self:background_set("blue") + + -- init menu config dialog + local mconfdialog = mconfdialog:new("mconfdialog.main", rect {1, 1, self:width() - 1, self:height() - 1}, "menu config") + self:insert(mconfdialog) +end + +-- main entry +function main(...) + demo:run(...) +end |
