Expand description
Embeddable egui editors for BREP_ecad_core documents: schematic and wiring-diagram sheets, the board, symbols and pads (footprints).
The host owns file I/O and application chrome. Editor edits the
Document it holds; call Editor::toolbar and Editor::show each
frame and take Editor::take_change to learn that something changed.
actions() lists every command, named and grouped, for a host’s toolbar,
menus and automation. SymbolEditor and FootprintEditor edit one
symbol or one footprint. See the README for an example.
Modules§
- widgets
- Shared egui form widgets.
Structs§
- Action
- One command of an editor
T. Its predicates read the editor, so they answer for the current state. - Change
- An edit the host has not taken yet; see
Editor::take_change. - Editor
- Footprint
Editor - Draws one footprint: its pads, holes, and silkscreen. The host places
Self::toolbar,Self::properties, andSelf::show, runs commands frompad_actionsby id, and takes each edit withSelf::take_change. - Part
- A part the host offers to place: its own key and version, the name to show, the symbol and pads a placed component copies, and the label it goes by.
- PinPoints
- What a HOST’s model says this symbol’s pins bind to.
- Symbol
Editor - Draws one symbol: its outlines, text, and pins. The host places
Self::toolbar,Self::properties, andSelf::show, runs commands fromsymbol_actionsby id, and takes each edit withSelf::take_change.
Enums§
- Action
Group - Where an action sits in the editor’s own toolbar.
- Board
Selection - Board
Tool - Selection
- Tool
- View
Constants§
- POWER_
NETS - The power symbols the Power tool offers by name; any other name may be typed.
- ZONE_
MARGIN - How far the board zone on a sheet reaches past the parts on the board: 5.08 mm.
Functions§
- actions
- Every action the sheet and board editor has, in toolbar order.
- is_
ground - Whether a power net’s symbol is drawn as a ground, bars below its pin, rather than as a supply, an arrow above it.
- keys_
reach_ editor - Whether an eCAD editor that is up takes this frame’s keys: every key, wherever
the pointer is, unless a TEXT FIELD has the keyboard (in the Inspector, a side
pane, the tool card or a window). All four editors ask this before their
shortcuts: Diagram and PCB in their own
show, Symbol and Pads in theirrun_shortcuts. The host’s Delete and Escape on an eCAD workbench ask it too. Notegui_wants_keyboard_input: that is ANY focused widget, and a button reached by Tab would take R from the editor while doing nothing with it. - pad_
actions - Every command of the pads editor, in toolbar order.
- power_
symbol - The power symbol for net
name, as KiCad’spowerlibrary draws one: a single hidden power input pin at its origin, named for the net, under reference#PWR.Document::placenames the pin’s net afterSymbol::power_net, so every power symbol of one name is one net; the board and the parts list leave it out, as they leave out KiCad’s. Its pin is a power INPUT, as KiCad’s is, so it does not drive the net: a net fed from off the sheet still wants a power flag (Tool::PowerFlag). - symbol_
actions - Every command of the symbol editor, in toolbar order.