pub struct Rip {
pub bell: bool,
pub block: Option<BlockTransfer>,
pub scene_depth: usize,
pub dirty: bool,
/* private fields */
}Fields§
§bell: bool$BEEP$ and the other sounds: ring the bell.
block: Option<BlockTransfer>A file transfer the BBS started, for the session.
scene_depth: usizeHow many scenes are playing inside each other.
dirty: boolChanged since the front end last looked.
Implementations§
Source§impl Rip
impl Rip
pub fn regions(&self) -> &[MouseRegion]
Sourcepub fn press(
&mut self,
s: &mut Screen,
x: usize,
y: usize,
io: &mut Io<'_>,
) -> Option<Vec<u8>>
pub fn press( &mut self, s: &mut Screen, x: usize, y: usize, io: &mut Io<'_>, ) -> Option<Vec<u8>>
A click on the canvas at (x, y): what it sends, with its text
variables filled in. A mouse region’s command, or else a query
waiting for a click (1 ESC, modes 1 and 2). None if nothing, or if
the user must answer a question first (see Rip::take_question).
pub fn has_question(&self) -> bool
Sourcepub fn take_question(&mut self) -> Option<Question>
pub fn take_question(&mut self) -> Option<Question>
The question for the user, if a text variable needs one.
Sourcepub fn answer(
&mut self,
s: &mut Screen,
answer: Option<String>,
io: &mut Io<'_>,
)
pub fn answer( &mut self, s: &mut Screen, answer: Option<String>, io: &mut Io<'_>, )
The user’s answer to the last question (None: cancelled).
Sourcepub fn click(&self, x: usize, y: usize) -> Option<Vec<u8>>
pub fn click(&self, x: usize, y: usize) -> Option<Vec<u8>>
What clicking the canvas at (x, y) sends, if it is in a mouse region (the last defined wins, as they are drawn over each other).
Sourcepub fn byte(
&mut self,
s: &mut Screen,
b: u8,
at_line_start: bool,
io: &mut Io<'_>,
) -> Feed
pub fn byte( &mut self, s: &mut Screen, b: u8, at_line_start: bool, io: &mut Io<'_>, ) -> Feed
Take a byte at the text level: at_line_start says whether it
begins a line, where a RIP line may start.
Sourcepub fn take_scene(&mut self) -> Option<Vec<u8>>
pub fn take_scene(&mut self) -> Option<Vec<u8>>
A scene file a 1R asked for: the caller plays it as if it came
from the BBS, before the rest of what did.