mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2024-06-26 11:30:34 +00:00
6c31bc3912
Add documentation to public method. Publish method which are public Use SelectionExt trait. Rename add_node_with_port to create_node_with_port
33 lines
1 KiB
Rust
33 lines
1 KiB
Rust
// selection.rs
|
|
//
|
|
// Copyright 2022 Stéphane Cerveau <scerveau@collabora.com>
|
|
//
|
|
// This program is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
//
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
pub trait SelectionExt {
|
|
/// Toggle selected
|
|
///
|
|
fn toggle_selected(&self);
|
|
|
|
/// Set selection to selected state
|
|
///
|
|
fn set_selected(&self, selected: bool);
|
|
|
|
/// Retrieve selection state
|
|
///
|
|
fn selected(&self) -> bool;
|
|
}
|