Sha256: 28f89c3b2f1cd38a43db9d9f9c9bf3546c48e419f49ba789ec4f2e1bb3108cdd

Contents?: true

Size: 607 Bytes

Versions: 6

Compression:

Stored size: 607 Bytes

Contents

#pragma once
#include "AutomationControl.h"

ref class Toggle : public AutomationControl
{
public:
  Toggle(const HWND windowHandle) : AutomationControl(windowHandle) {}
  Toggle(const FindInformation& findInformation) : AutomationControl(findInformation) {}

  property bool IsSet {
    bool get() { return AsTogglePattern->Current.ToggleState == System::Windows::Automation::ToggleState::On; }
  }

private:
	property TogglePattern^ AsTogglePattern {
		TogglePattern^ get() {
			return dynamic_cast<TogglePattern^>(_control->GetCurrentPattern(TogglePattern::Pattern));
		}
	}
  
};

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rautomation-0.10.0 ext/UiaDll/UiaDll/Toggle.h
rautomation-0.9.4 ext/UiaDll/UiaDll/Toggle.h
rautomation-0.9.3 ext/UiaDll/UiaDll/Toggle.h
rautomation-0.9.2 ext/UiaDll/UiaDll/Toggle.h
rautomation-0.9.1 ext/UiaDll/UiaDll/Toggle.h
rautomation-0.9.0 ext/UiaDll/UiaDll/Toggle.h