pub trait GuiVComponent_Impl<T: HasIDispatch = Self>: HasIDispatch<T> {
Show 22 methods // Provided methods fn acc_label_collection(&self) -> Result<GuiComponentCollection> { ... } fn acc_text(&self) -> Result<String> { ... } fn acc_text_on_request(&self) -> Result<String> { ... } fn acc_tooltip(&self) -> Result<String> { ... } fn changeable(&self) -> Result<bool> { ... } fn default_tooltip(&self) -> Result<String> { ... } fn height(&self) -> Result<i32> { ... } fn icon_name(&self) -> Result<String> { ... } fn is_symbol_font(&self) -> Result<bool> { ... } fn left(&self) -> Result<i32> { ... } fn modified(&self) -> Result<bool> { ... } fn parent_frame(&self) -> Result<SAPComponent> { ... } fn screen_left(&self) -> Result<i32> { ... } fn screen_top(&self) -> Result<i32> { ... } fn text(&self) -> Result<String> { ... } fn set_text(&self, value: String) -> Result<()> { ... } fn tooltip(&self) -> Result<String> { ... } fn top(&self) -> Result<i32> { ... } fn width(&self) -> Result<i32> { ... } fn dump_state(&self, p0: String) -> Result<GuiCollection> { ... } fn set_focus(&self) -> Result<()> { ... } fn visualize(&self, p0: bool) -> Result<bool> { ... }
}

Provided Methods§

source

fn acc_label_collection(&self) -> Result<GuiComponentCollection>

source

fn acc_text(&self) -> Result<String>

source

fn acc_text_on_request(&self) -> Result<String>

source

fn acc_tooltip(&self) -> Result<String>

source

fn changeable(&self) -> Result<bool>

source

fn default_tooltip(&self) -> Result<String>

source

fn height(&self) -> Result<i32>

source

fn icon_name(&self) -> Result<String>

source

fn is_symbol_font(&self) -> Result<bool>

source

fn left(&self) -> Result<i32>

source

fn modified(&self) -> Result<bool>

source

fn parent_frame(&self) -> Result<SAPComponent>

source

fn screen_left(&self) -> Result<i32>

source

fn screen_top(&self) -> Result<i32>

source

fn text(&self) -> Result<String>

source

fn set_text(&self, value: String) -> Result<()>

Examples found in repository?
examples/simple.rs (line 53)
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(())
}
More examples
Hide additional examples
examples/charge.rs (line 24)
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
fn main() -> crate::Result<()> {
    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();
        session.start_transaction("fpe1".to_string())?;

        match session.find_by_id("wnd[0]/usr/ctxtFKKKO-BLART".to_string())? {
            SAPComponent::GuiCTextField(ctxt) => ctxt.set_text("P1".to_string())?,
            _ => panic!("expected doc type ctextfield")
        }
        match session.find_by_id("wnd[0]/usr/ctxtFKKKO-WAERS".to_string())? {
            SAPComponent::GuiCTextField(ctxt) => ctxt.set_text("GBP".to_string())?,
            _ => panic!("expected currency ctextfield")
        }
        match session.find_by_id("wnd[0]/usr/txtFKKKO-XBLNR".to_string())? {
            SAPComponent::GuiTextField(txt) => txt.set_text("XA12345678".to_string())?,
            _ => panic!("expected reference textfield")
        }
    } else {
        panic!("no window!");
    }

    Ok(())
}
source

fn tooltip(&self) -> Result<String>

source

fn top(&self) -> Result<i32>

source

fn width(&self) -> Result<i32>

source

fn dump_state(&self, p0: String) -> Result<GuiCollection>

source

fn set_focus(&self) -> Result<()>

source

fn visualize(&self, p0: bool) -> Result<bool>

Implementors§

source§

impl GuiVComponent_Impl<GuiBarChart> for GuiBarChart

source§

impl GuiVComponent_Impl<GuiBox> for GuiBox

source§

impl GuiVComponent_Impl<GuiButton> for GuiButton

source§

impl GuiVComponent_Impl<GuiCTextField> for GuiCTextField

source§

impl GuiVComponent_Impl<GuiCalendar> for GuiCalendar

source§

impl GuiVComponent_Impl<GuiChart> for GuiChart

source§

impl GuiVComponent_Impl<GuiCheckBox> for GuiCheckBox

source§

impl GuiVComponent_Impl<GuiColorSelector> for GuiColorSelector

source§

impl GuiVComponent_Impl<GuiComboBox> for GuiComboBox

source§

impl GuiVComponent_Impl<GuiComboBoxControl> for GuiComboBoxControl

source§

impl GuiVComponent_Impl<GuiContainerShell> for GuiContainerShell

source§

impl GuiVComponent_Impl<GuiCustomControl> for GuiCustomControl

source§

impl GuiVComponent_Impl<GuiDialogShell> for GuiDialogShell

source§

impl GuiVComponent_Impl<GuiDockShell> for GuiDockShell

source§

impl GuiVComponent_Impl<GuiEAIViewer2D> for GuiEAIViewer2D

source§

impl GuiVComponent_Impl<GuiEAIViewer3D> for GuiEAIViewer3D

source§

impl GuiVComponent_Impl<GuiFrameWindow> for GuiFrameWindow

source§

impl GuiVComponent_Impl<GuiGOSShell> for GuiGOSShell

source§

impl GuiVComponent_Impl<GuiGraphAdapt> for GuiGraphAdapt

source§

impl GuiVComponent_Impl<GuiGridView> for GuiGridView

source§

impl GuiVComponent_Impl<GuiHTMLViewer> for GuiHTMLViewer

source§

impl GuiVComponent_Impl<GuiInputFieldControl> for GuiInputFieldControl

source§

impl GuiVComponent_Impl<GuiLabel> for GuiLabel

source§

impl GuiVComponent_Impl<GuiMainWindow> for GuiMainWindow

source§

impl GuiVComponent_Impl<GuiMap> for GuiMap

source§

impl GuiVComponent_Impl<GuiMenu> for GuiMenu

source§

impl GuiVComponent_Impl<GuiMenubar> for GuiMenubar

source§

impl GuiVComponent_Impl<GuiMessageWindow> for GuiMessageWindow

source§

impl GuiVComponent_Impl<GuiModalWindow> for GuiModalWindow

source§

impl GuiVComponent_Impl<GuiNetChart> for GuiNetChart

source§

impl GuiVComponent_Impl<GuiOfficeIntegration> for GuiOfficeIntegration

source§

impl GuiVComponent_Impl<GuiOkCodeField> for GuiOkCodeField

source§

impl GuiVComponent_Impl<GuiPasswordField> for GuiPasswordField

source§

impl GuiVComponent_Impl<GuiPicture> for GuiPicture

source§

impl GuiVComponent_Impl<GuiRadioButton> for GuiRadioButton

source§

impl GuiVComponent_Impl<GuiSapChart> for GuiSapChart

source§

impl GuiVComponent_Impl<GuiScrollContainer> for GuiScrollContainer

source§

impl GuiVComponent_Impl<GuiShell> for GuiShell

source§

impl GuiVComponent_Impl<GuiSimpleContainer> for GuiSimpleContainer

source§

impl GuiVComponent_Impl<GuiSplit> for GuiSplit

source§

impl GuiVComponent_Impl<GuiSplitterContainer> for GuiSplitterContainer

source§

impl GuiVComponent_Impl<GuiStage> for GuiStage

source§

impl GuiVComponent_Impl<GuiStatusPane> for GuiStatusPane

source§

impl GuiVComponent_Impl<GuiStatusbar> for GuiStatusbar

source§

impl GuiVComponent_Impl<GuiTab> for GuiTab

source§

impl GuiVComponent_Impl<GuiTabStrip> for GuiTabStrip

source§

impl GuiVComponent_Impl<GuiTableControl> for GuiTableControl

source§

impl GuiVComponent_Impl<GuiTextField> for GuiTextField

source§

impl GuiVComponent_Impl<GuiTextedit> for GuiTextedit

source§

impl GuiVComponent_Impl<GuiTitlebar> for GuiTitlebar

source§

impl GuiVComponent_Impl<GuiToolbar> for GuiToolbar

source§

impl GuiVComponent_Impl<GuiToolbarControl> for GuiToolbarControl

source§

impl GuiVComponent_Impl<GuiTree> for GuiTree

source§

impl GuiVComponent_Impl<GuiUserArea> for GuiUserArea

source§

impl GuiVComponent_Impl<GuiVComponent> for GuiVComponent

source§

impl GuiVComponent_Impl<GuiVContainer> for GuiVContainer

source§

impl GuiVComponent_Impl<GuiVHViewSwitch> for GuiVHViewSwitch