Trait sap_scripting::types::GuiFrameWindow_Impl
source · pub trait GuiFrameWindow_Impl<T: HasIDispatch = Self>: HasIDispatch<T> {
Show 20 methods
// Provided methods
fn element_visualization_mode(&self) -> Result<bool> { ... }
fn set_element_visualization_mode(&self, value: bool) -> Result<()> { ... }
fn gui_focus(&self) -> Result<SAPComponent> { ... }
fn handle(&self) -> Result<i64> { ... }
fn iconic(&self) -> Result<bool> { ... }
fn system_focus(&self) -> Result<SAPComponent> { ... }
fn working_pane_height(&self) -> Result<i64> { ... }
fn working_pane_width(&self) -> Result<i64> { ... }
fn close(&self) -> Result<()> { ... }
fn comp_bitmap(&self, p0: String, p1: String) -> Result<i64> { ... }
fn iconify(&self) -> Result<()> { ... }
fn is_v_key_allowed(&self, p0: i32) -> Result<bool> { ... }
fn jump_backward(&self) -> Result<()> { ... }
fn jump_forward(&self) -> Result<()> { ... }
fn maximize(&self) -> Result<()> { ... }
fn restore(&self) -> Result<()> { ... }
fn send_v_key(&self, p0: i32) -> Result<()> { ... }
fn show_message_box(
&self,
p0: String,
p1: String,
p2: i64,
p3: i64
) -> Result<i64> { ... }
fn tab_backward(&self) -> Result<()> { ... }
fn tab_forward(&self) -> Result<()> { ... }
}Provided Methods§
fn element_visualization_mode(&self) -> Result<bool>
fn set_element_visualization_mode(&self, value: bool) -> Result<()>
fn gui_focus(&self) -> Result<SAPComponent>
fn handle(&self) -> Result<i64>
fn iconic(&self) -> Result<bool>
fn system_focus(&self) -> Result<SAPComponent>
fn working_pane_height(&self) -> Result<i64>
fn working_pane_width(&self) -> Result<i64>
fn close(&self) -> Result<()>
fn comp_bitmap(&self, p0: String, p1: String) -> Result<i64>
fn iconify(&self) -> Result<()>
fn is_v_key_allowed(&self, p0: i32) -> Result<bool>
fn jump_backward(&self) -> Result<()>
fn jump_forward(&self) -> Result<()>
sourcefn maximize(&self) -> Result<()>
fn maximize(&self) -> Result<()>
Examples found in repository?
examples/simple.rs (line 48)
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
fn main() -> crate::Result<()> {
// Initialise the environment.
let com_instance = SAPComInstance::new().expect("Couldn't get COM instance");
let wrapper = com_instance.sap_wrapper().expect("Couldn't get SAP wrapper");
let engine = wrapper.scripting_engine().expect("Couldn't get GuiApplication instance");
let connection = match sap_scripting::GuiApplication_Impl::children(&engine)?.element_at(0)? {
SAPComponent::GuiConnection(conn) => conn,
_ => panic!("expected connection, but got something else!"),
};
eprintln!("Got connection");
let session = match sap_scripting::GuiConnection_Impl::children(&connection)?.element_at(0)? {
SAPComponent::GuiSession(session) => session,
_ => panic!("expected session, but got something else!"),
};
if let SAPComponent::GuiMainWindow(wnd) = session.find_by_id("wnd[0]".to_owned())? {
wnd.maximize().unwrap();
if let SAPComponent::GuiOkCodeField(tbox_comp) =
session.find_by_id("wnd[0]/tbar[0]/okcd".to_owned())?
{
tbox_comp.set_text("/nfpl9".to_owned()).unwrap();
wnd.send_v_key(0).unwrap();
} else {
panic!("no ok code field!");
}
} else {
panic!("no window!");
}
Ok(())
}fn restore(&self) -> Result<()>
sourcefn send_v_key(&self, p0: i32) -> Result<()>
fn send_v_key(&self, p0: i32) -> Result<()>
Examples found in repository?
examples/simple.rs (line 54)
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
fn main() -> crate::Result<()> {
// Initialise the environment.
let com_instance = SAPComInstance::new().expect("Couldn't get COM instance");
let wrapper = com_instance.sap_wrapper().expect("Couldn't get SAP wrapper");
let engine = wrapper.scripting_engine().expect("Couldn't get GuiApplication instance");
let connection = match sap_scripting::GuiApplication_Impl::children(&engine)?.element_at(0)? {
SAPComponent::GuiConnection(conn) => conn,
_ => panic!("expected connection, but got something else!"),
};
eprintln!("Got connection");
let session = match sap_scripting::GuiConnection_Impl::children(&connection)?.element_at(0)? {
SAPComponent::GuiSession(session) => session,
_ => panic!("expected session, but got something else!"),
};
if let SAPComponent::GuiMainWindow(wnd) = session.find_by_id("wnd[0]".to_owned())? {
wnd.maximize().unwrap();
if let SAPComponent::GuiOkCodeField(tbox_comp) =
session.find_by_id("wnd[0]/tbar[0]/okcd".to_owned())?
{
tbox_comp.set_text("/nfpl9".to_owned()).unwrap();
wnd.send_v_key(0).unwrap();
} else {
panic!("no ok code field!");
}
} else {
panic!("no window!");
}
Ok(())
}