GstPipelineStudio/src/graphmanager/selection.rs
Stéphane Cerveau 6c31bc3912 graphview: add documentation and refactor the code
Add documentation to public method.
Publish method which are public
Use SelectionExt trait.
Rename add_node_with_port to create_node_with_port
2022-01-19 11:55:13 +01:00

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;
}