Module zng::rule_line

source ·
Expand description

Rule line widgets and properties.

A rule line is a horizontal or vertical separator line, this module provides 3 widgets the RuleLine! base that can dynamically change orientation and the hr::Hr! and vr::Vr! that represents each orientation and can be styled separately.

use zng::prelude::*;

Window! {
    context_menu = ContextMenu!(ui_vec![
        Button!(zng::app::NEW_CMD.scoped(WINDOW.id())),
        Button!(zng::app::OPEN_CMD.scoped(WINDOW.id())),
        Hr!(),
        Button!(zng::app::EXIT_CMD),
    ]);
}

The example above uses the Hr! widget in a context menu to separate the commands into two groups.

§Full API

See zng_wgt_rule_line for the full widget API.

Modules§

  • Horizontal rule line widget and properties.
  • Vertical rule line widget and properties.

Structs§

  • W Draws a horizontal or vertical rule line.