unioffice/common/axcontrol/axcontrol.go

445 lines
72 KiB
Go
Raw Normal View History

2022-01-15 21:17:38 +00:00
//
// Copyright 2020 FoxyUtils ehf. All rights reserved.
//
// This is a commercial product and requires a license to operate.
// A trial license can be obtained at https://unidoc.io
//
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
//
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
2024-05-22 00:21:11 +00:00
package axcontrol ;import (_g "bytes";_a "encoding/binary";_e "errors";_c "fmt";_dd "github.com/unidoc/unioffice/common/tempstorage";_dff "github.com/unidoc/unioffice/internal/mscfb";_gd "github.com/unidoc/unioffice/internal/mscfb/rw";_f "github.com/unidoc/unioffice/schema/schemas.microsoft.com/office/activeX";
_df "io";);type stdPicture struct{_abg uint32 ;_gbe uint32 ;_faf *_g .Buffer ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetMax sets a button max value.
func (_bgae *ScrollBarControl )SetMax (max int32 ){_bgae ._abbf ._edf =true ;_bgae ._fff ._gdbc =max };func (_ffef *morphDataControl )readColumnInfoPropMask (_bafdf *_gd .Reader )error {return nil };type spinButtonPropMask struct{_cdffe bool ;_febd bool ;
_dbdd bool ;_gca bool ;_bee bool ;_fdd bool ;_cgbgf bool ;_caf bool ;_ffda bool ;_ggce bool ;_aaa bool ;_dbfa bool ;_adbe bool ;_gbab bool ;};
2022-12-06 11:56:49 +00:00
2024-05-22 00:21:11 +00:00
// OptionButtonDataControl is a representation of an option button ActiveX form.
type OptionButtonDataControl struct{*morphDataControlBoolValue };func _cbf (_fcbc *_gd .Reader )(*LabelControl ,error ){_agg :=&LabelControl {};if _ffgg :=_agg .readPropMask (_fcbc );_ffgg !=nil {return nil ,_ffgg ;};if _dccb :=_agg .readDataBlock (_fcbc );
_dccb !=nil {return nil ,_dccb ;};if _dbc :=_agg .readExtraDataBlock (_fcbc );_dbc !=nil {return nil ,_dbc ;};if _fcae :=_agg .readStreamDataPM (_fcbc ,_agg ._egdgc ._bafc ,_agg ._egdgc ._ccdc );_fcae !=nil {return nil ,_fcae ;};if _dca :=_agg .readTheRest (_fcbc );
_dca !=nil {return nil ,_dca ;};return _agg ,nil ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetMax sets a button max value.
func (_afgf *SpinButtonControl )SetMax (max int32 ){_afgf ._degc ._fdd =true ;_afgf ._cabc ._ddgb =max };type morphDataControlBoolValue struct{*morphDataControl };
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// GetForeColor gets a button text color value for a system palette from a spinButton control.
func (_cbd *SpinButtonControl )GetForeColor ()uint32 {return _cbd ._cabc ._ccfa };type labelDataBlock struct{_ccae uint32 ;_bfg uint32 ;_fcc uint32 ;_ddag uint32 ;_fgb bool ;_gefb uint32 ;_acb uint8 ;_dgbd uint32 ;_geec uint16 ;_ebe uint16 ;_bbdc uint16 ;
_dgcc rune ;_ffb uint16 ;};
// GetWidth returns width of the morphDataControl in HIMETRIC (0.01mm)
func (_fcfd *morphDataControl )GetWidth ()uint32 {return _fcfd ._eabc ._eccd };
// SetForeColor sets a button text color value from a system palette for a spinButton control.
func (_afab *SpinButtonControl )SetForeColor (foreColor uint32 ){_afab ._degc ._cdffe =true ;_afab ._cabc ._ccfa =foreColor ;};
2023-12-12 23:20:29 +00:00
2024-05-08 13:54:39 +00:00
// GetForeColor gets a button text color value for a system palette from a commandButton control.
2024-05-22 00:21:11 +00:00
func (_aga *CommandButtonControl )GetForeColor ()uint32 {return _aga ._fd ._dbea };func (_dcc *CommandButtonControl )export (_gfac *_gd .Writer )error {if _acd :=_dcc .writePropMask (_gfac );_acd !=nil {return _acd ;};if _gfc :=_dcc .writeDataBlock (_gfac );
_gfc !=nil {return _gfc ;};if _adb :=_dcc .writeExtraDataBlock (_gfac );_adb !=nil {return _adb ;};_dcc ._egde =uint16 (_gfac .Len ()-4);if _acaf :=_dcc .writeStreamDataPM (_gfac );_acaf !=nil {return _acaf ;};return _dcc .writeTheRest (_gfac );};func (_adag *controlBase )readStreamDataPM (_bae *_gd .Reader ,_gdbce ,_abac bool )error {_adag ._aae =&streamData {};
if _gdbce {_adag ._aae ._gcgf =&guidAndPicture {};if _eedgc :=_adag ._aae ._gcgf .importFromReader (_bae );_eedgc !=nil {return _eedgc ;};};if _abac {_adag ._aae ._agab =&guidAndPicture {};if _aeecc :=_adag ._aae ._agab .importFromReader (_bae );_aeecc !=nil {return _aeecc ;
};};return nil ;};
2023-12-12 23:20:29 +00:00
2024-05-22 00:21:11 +00:00
// GetHeight returns height of the Label in HIMETRIC (0.01mm)
func (_ccgd *LabelControl )GetHeight ()uint32 {return _ccgd ._cgc ._afd };func (_ccgcd *morphDataControl )getValueBool ()bool {return _ccgcd ._cbef ._edce &&_ccgcd ._eabc ._efe =="\u0031";};func (_acc *CommandButtonControl )writeExtraDataBlock (_fbb *_gd .Writer )error {if _acc ._fd ._aeg > 0{if _deg :=_fbb .WriteStringProperty (_acc ._bbgd ._egdb );
_deg !=nil {return _deg ;};};if _acc ._fee ._aec {_eefg :=uint64 (_acc ._bbgd ._cde )<<32|uint64 (_acc ._bbgd ._ead );if _acg :=_fbb .WritePropertyNoAlign (_eefg );_acg !=nil {return _acg ;};};return nil ;};func (_bbcf *LabelControl )export (_ccgc *_gd .Writer )error {if _efgg :=_bbcf .writePropMask (_ccgc );
_efgg !=nil {return _efgg ;};if _egga :=_bbcf .writeDataBlock (_ccgc );_egga !=nil {return _egga ;};if _geb :=_bbcf .writeExtraDataBlock (_ccgc );_geb !=nil {return _geb ;};_bbcf ._egde =uint16 (_ccgc .Len ()-4);if _fbcb :=_bbcf .writeStreamDataPM (_ccgc );
_fbcb !=nil {return _fbcb ;};return _bbcf .writeTheRest (_ccgc );};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// GetWidth returns width of the CommandButton in HIMETRIC (0.01mm)
func (_ae *CommandButtonControl )GetWidth ()uint32 {return _ae ._bbgd ._cde };var _ebf =len (_eag );
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetValue sets a value for a control which value can be represented as boolean (on/off).
func (_gbda *morphDataControlBoolValue )SetValue (value bool ){_gbda .setValueBool (value )};type morphDataPropMask struct{_aag bool ;_febc bool ;_eggg bool ;_adef bool ;_eded bool ;_fea bool ;_ffce bool ;_cdf bool ;_agge bool ;_aceb bool ;_fbf bool ;_cfe bool ;
_gebf bool ;_fdef bool ;_aabg bool ;_ddefb bool ;_cgde bool ;_babb bool ;_bea bool ;_dccbc bool ;_fgce bool ;_edce bool ;_cbad bool ;_bcbf bool ;_fbg bool ;_begac bool ;_adg bool ;_eaea bool ;_ebac bool ;_fgbf bool ;};func (_dgcf *morphDataControl )writeColumnInfoPropMask (_fefa *_gd .Writer )error {return nil };
const _abea =5;type morphDataExtraDataBlock struct{_eccd uint32 ;_acgc uint32 ;_efe string ;_dab string ;_fgaf string ;};
2024-05-04 18:48:06 +00:00
2024-05-22 00:21:11 +00:00
// ToggleButtonDataControl is a representation of a toggle button ActiveX form.
type ToggleButtonDataControl struct{*morphDataControlBoolValue };func (_bfc *controlBase )setPictureBytes (_ddc []byte ){if _bfc ._aae ._gcgf ==nil {_bfc ._aae ._gcgf =&guidAndPicture {};};_bfc ._aae ._gcgf .setStdPictureBytes (_ddc );};func (_ddae *ImageControl )export (_abe *_gd .Writer )error {if _cab :=_ddae .writePropMask (_abe );
_cab !=nil {return _cab ;};if _agce :=_ddae .writeDataBlock (_abe );_agce !=nil {return _agce ;};if _fde :=_ddae .writeExtraDataBlock (_abe );_fde !=nil {return _fde ;};_ddae ._egde =uint16 (_abe .Len ()-4);if _bafd :=_ddae .writeStreamDataPM (_abe );_bafd !=nil {return _bafd ;
};return _ddae .writeTheRest (_abe );};
2024-05-04 18:48:06 +00:00
2024-05-08 13:54:39 +00:00
// ControlChoice represents an ActiveX control inside a wrapper.
type ControlChoice struct{CheckBox *CheckBoxDataControl ;TextBox *TextBoxDataControl ;ListBox *ListBoxDataControl ;ComboBox *ComboBoxDataControl ;OptionButton *OptionButtonDataControl ;ToggleButton *ToggleButtonDataControl ;Label *LabelControl ;Image *ImageControl ;
2024-05-22 00:21:11 +00:00
SpinButton *SpinButtonControl ;CommandButton *CommandButtonControl ;ScrollBar *ScrollBarControl ;_ff *controlBase ;};func (_dfg *morphDataControl )setValueString (_cgd string ){_dfg ._cbef ._edce =true ;_dfg ._adfg ._dgdg =uint32 (len (_cgd ));_dfg ._eabc ._efe =_cgd ;
2023-12-28 15:53:06 +00:00
};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetForeColor sets a button text color value from a system palette for a commandButton control.
func (_ee *CommandButtonControl )SetForeColor (foreColor uint32 ){_ee ._fee ._aef =true ;_ee ._fd ._dbea =foreColor ;};const _ega =2;
2024-05-04 18:48:06 +00:00
2024-05-22 00:21:11 +00:00
// SetWidth sets width of the ScrollBar in HIMETRIC (0.01mm)
func (_cfc *ScrollBarControl )SetWidth (width uint32 ){_cfc ._abbf ._cag =true ;_cfc ._deba ._cdec =width ;};const _cga =4;func (_fecc *ScrollBarControl )writePropMask (_fdg *_gd .Writer )error {_bcbb :=uint32 (0);_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._efde );
_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._eee );_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._ggef );_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._cag );_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._cdfa );_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._facf );
_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._edf );_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._adaa );_bcbb >>=1;_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._dgea );_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._fgfcc );_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._ffa );
_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._adedd );_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._bdbb );_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._cfgc );_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._cdff );_bcbb =_gd .PushLeftUI32 (_bcbb ,_fecc ._abbf ._eada );
_bcbb >>=15;return _a .Write (_fdg ,_a .LittleEndian ,_bcbb );};
2024-05-04 18:48:06 +00:00
2024-05-22 00:21:11 +00:00
// GetMin gets a button min value.
func (_daea *SpinButtonControl )GetMin ()int32 {return _daea ._cabc ._acbb };
2024-05-04 18:48:06 +00:00
2024-05-22 00:21:11 +00:00
// SetCaption sets a caption string for a morph control.
func (_bcdg *morphDataControl )SetCaption (caption string ){if _bcdg ._efgd {_bcdg ._cbef ._cbad =true ;_bcdg ._adfg ._fgfc =uint32 (len (caption ));_bcdg ._eabc ._dab =caption ;};};func (_geeb *LabelControl )writeDataBlock (_edbb *_gd .Writer )error {if _geeb ._egdgc ._bca {if _dgccd :=_edbb .WriteProperty (_geeb ._dbf ._ccae );
_dgccd !=nil {return _dgccd ;};};if _geeb ._egdgc ._bbd {if _aegc :=_edbb .WriteProperty (_geeb ._dbf ._bfg );_aegc !=nil {return _aegc ;};};if _geeb ._egdgc ._ebc {if _ebeb :=_edbb .WriteProperty (_geeb ._dbf ._fcc );_ebeb !=nil {return _ebeb ;};};if _geeb ._egdgc ._gbgd {_edcf :=_efgb (_geeb ._dbf ._ddag ,_geeb ._dbf ._fgb );
if _ddcd :=_edbb .WriteProperty (_edcf );_ddcd !=nil {return _ddcd ;};};if _geeb ._egdgc ._deaa {if _fgc :=_edbb .WriteProperty (_geeb ._dbf ._gefb );_fgc !=nil {return _fgc ;};};if _geeb ._egdgc ._cgb {if _dac :=_edbb .WriteProperty (_geeb ._dbf ._acb );
_dac !=nil {return _dac ;};};if _geeb ._egdgc ._ddgg {if _eaaf :=_edbb .WriteProperty (_geeb ._dbf ._dgbd );_eaaf !=nil {return _eaaf ;};};if _geeb ._egdgc ._gba {if _dfab :=_edbb .WriteProperty (_geeb ._dbf ._geec );_dfab !=nil {return _dfab ;};};if _geeb ._egdgc ._dfb {if _cff :=_edbb .WriteProperty (_geeb ._dbf ._ebe );
_cff !=nil {return _cff ;};};if _geeb ._egdgc ._bafc {if _edbc :=_edbb .WriteProperty (_geeb ._dbf ._bbdc );_edbc !=nil {return _edbc ;};};if _geeb ._egdgc ._ace {if _dgca :=_edbb .WriteProperty (_geeb ._dbf ._dgcc );_dgca !=nil {return _dgca ;};};if _geeb ._egdgc ._ccdc {if _gbc :=_edbb .WriteProperty (_geeb ._dbf ._ffb );
_gbc !=nil {return _gbc ;};};return _edbb .AlignLength (4);};func (_adc *ImageControl )readDataBlock (_dbbf *_gd .Reader )error {_adc ._dcg =&imageDataBlock {};if _adc ._beb ._dea {if _eea :=_dbbf .ReadProperty (&_adc ._dcg ._bfb );_eea !=nil {return _eea ;
};};if _adc ._beb ._fbcd {if _ecd :=_dbbf .ReadProperty (&_adc ._dcg ._eac );_ecd !=nil {return _ecd ;};};if _adc ._beb ._eaff {if _fegb :=_dbbf .ReadProperty (&_adc ._dcg ._ebaf );_fegb !=nil {return _fegb ;};};if _adc ._beb ._bga {if _ddbb :=_dbbf .ReadProperty (&_adc ._dcg ._ccaa );
_ddbb !=nil {return _ddbb ;};};if _adc ._beb ._gfe {if _cbeg :=_dbbf .ReadProperty (&_adc ._dcg ._fgac );_cbeg !=nil {return _cbeg ;};};if _adc ._beb ._gdd {if _bfba :=_dbbf .ReadProperty (&_adc ._dcg ._ggb );_bfba !=nil {return _bfba ;};};if _adc ._beb ._begb {if _egee :=_dbbf .ReadProperty (&_adc ._dcg ._eedg );
_egee !=nil {return _egee ;};};if _adc ._beb ._ccbd {if _gdf :=_dbbf .ReadProperty (&_adc ._dcg ._bafe );_gdf !=nil {return _gdf ;};};if _adc ._beb ._dbbc {if _aaefc :=_dbbf .ReadProperty (&_adc ._dcg ._bega );_aaefc !=nil {return _aaefc ;};};if _adc ._beb ._feb {if _adfa :=_dbbf .ReadProperty (&_adc ._dcg ._gcf );
_adfa !=nil {return _adfa ;};};return nil ;};func (_deead *ScrollBarControl )readExtraDataBlock (_eca *_gd .Reader )error {_deead ._deba =&scrollBarExtraDataBlock {};if _deead ._abbf ._cag {var _acbc uint64 ;if _ebfb :=_eca .ReadPairProperty (&_acbc );
_ebfb !=nil {return _ebfb ;};_deead ._deba ._dcaf =uint32 (_acbc );_deead ._deba ._cdec =uint32 (_acbc >>32);};return nil ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// FmPictureSizeMode represents one of the three picture size modes according to MS-OFORMS document.
type FmPictureSizeMode byte ;func (_fdb *controlBase )writeStreamDataMP (_abfad *_gd .Writer )error {if _fdb ._aae !=nil {if _fdb ._aae ._agab !=nil {if _cade :=_fdb ._aae ._agab .export (_abfad );_cade !=nil {return _cade ;};};if _fdb ._aae ._gcgf !=nil {if _aaed :=_fdb ._aae ._gcgf .export (_abfad );
_aaed !=nil {return _aaed ;};};};return nil ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// ScrollBarControl is a representation of a scrollBar ActiveX form.
type ScrollBarControl struct{controlBase ;_abbf *scrollBarPropMask ;_fff *scrollBarDataBlock ;_deba *scrollBarExtraDataBlock ;_fbec *streamData ;};
2022-02-05 13:05:36 +00:00
2024-05-22 00:21:11 +00:00
// SetBackColor sets a button text color value from a system palette for a label control.
func (_dad *LabelControl )SetBackColor (backColor uint32 ){_dad ._egdgc ._bbd =true ;_dad ._dbf ._bfg =backColor ;};type imageExtraDataBlock struct{_agb uint32 ;_bbbg uint32 ;};type scrollBarPropMask struct{_efde bool ;_eee bool ;_ggef bool ;_cdfa bool ;
_cag bool ;_facf bool ;_edf bool ;_adaa bool ;_dgea bool ;_fgfcc bool ;_ffa bool ;_adedd bool ;_bdbb bool ;_cfgc bool ;_cdff bool ;_eada bool ;};func (_bac *morphDataControl )getValueString ()string {if _bac ._cbef ._edce {return _bac ._eabc ._efe ;};return "";
};const (FmPictureSizeModeClip FmPictureSizeMode =iota ;FmPictureSizeModeStretch ;_ ;FmPictureSizeModeZoom ;);func (_abd *morphDataControl )readDataBlock (_ccgdb *_gd .Reader )error {_abd ._adfg =&morphDataDataBlock {};if _abd ._cbef ._aag {if _ada :=_ccgdb .ReadProperty (&_abd ._adfg ._aea );
_ada !=nil {return _ada ;};};if _abd ._cbef ._febc {if _cdg :=_ccgdb .ReadProperty (&_abd ._adfg ._gdg );_cdg !=nil {return _cdg ;};};if _abd ._cbef ._eggg {if _gacd :=_ccgdb .ReadProperty (&_abd ._adfg ._bgeb );_gacd !=nil {return _gacd ;};};if _abd ._cbef ._adef {if _fcg :=_ccgdb .ReadProperty (&_abd ._adfg ._cgbg );
_fcg !=nil {return _fcg ;};};if _abd ._cbef ._eded {if _gggc :=_ccgdb .ReadProperty (&_abd ._adfg ._deea );_gggc !=nil {return _gggc ;};};if _abd ._cbef ._fea {if _gccd :=_ccgdb .ReadProperty (&_abd ._adfg ._gfca );_gccd !=nil {return _gccd ;};};if _abd ._cbef ._ffce {if _dcag :=_ccgdb .ReadProperty (&_abd ._adfg ._effd );
_dcag !=nil {return _dcag ;};};if _abd ._cbef ._cdf {if _fgbd :=_ccgdb .ReadProperty (&_abd ._adfg ._aegd );_fgbd !=nil {return _fgbd ;};};if _abd ._cbef ._aceb {if _bbeea :=_ccgdb .ReadProperty (&_abd ._adfg ._ffe );_bbeea !=nil {return _bbeea ;};};if _abd ._cbef ._fbf {if _gbbe :=_ccgdb .ReadProperty (&_abd ._adfg ._cadg );
_gbbe !=nil {return _gbbe ;};};if _abd ._cbef ._cfe {if _dcef :=_ccgdb .ReadProperty (&_abd ._adfg ._gfcae );_dcef !=nil {return _dcef ;};};if _abd ._cbef ._gebf {if _agba :=_ccgdb .ReadProperty (&_abd ._adfg ._ece );_agba !=nil {return _agba ;};};if _abd ._cbef ._fdef {if _dbdb :=_ccgdb .ReadProperty (&_abd ._adfg ._aad );
_dbdb !=nil {return _dbdb ;};};if _abd ._cbef ._aabg {if _cgab :=_ccgdb .ReadProperty (&_abd ._adfg ._gfcd );_cgab !=nil {return _cgab ;};};if _abd ._cbef ._ddefb {if _fccc :=_ccgdb .ReadProperty (&_abd ._adfg ._bfac );_fccc !=nil {return _fccc ;};};if _abd ._cbef ._cgde {if _gdef :=_ccgdb .ReadProperty (&_abd ._adfg ._baa );
_gdef !=nil {return _gdef ;};};if _abd ._cbef ._babb {if _fafe :=_ccgdb .ReadProperty (&_abd ._adfg ._ffdg );_fafe !=nil {return _fafe ;};};if _abd ._cbef ._bea {if _bgg :=_ccgdb .ReadProperty (&_abd ._adfg ._afdb );_bgg !=nil {return _bgg ;};};if _abd ._cbef ._dccbc {if _dgagf :=_ccgdb .ReadProperty (&_abd ._adfg ._ebag );
_dgagf !=nil {return _dgagf ;};};if _abd ._cbef ._fgce {if _bbdg :=_ccgdb .ReadProperty (&_abd ._adfg ._dge );_bbdg !=nil {return _bbdg ;};};if _abd ._cbef ._edce {var _ddf uint32 ;if _bbdcf :=_ccgdb .ReadProperty (&_ddf );_bbdcf !=nil {return _bbdcf ;
};_abd ._adfg ._bbf ,_abd ._adfg ._dgdg =_agf (_ddf );};if _abd ._cbef ._cbad {var _cbc uint32 ;if _bgf :=_ccgdb .ReadProperty (&_cbc );_bgf !=nil {return _bgf ;};_abd ._adfg ._cgad ,_abd ._adfg ._fgfc =_agf (_cbc );};if _abd ._cbef ._bcbf {if _gebfg :=_ccgdb .ReadProperty (&_abd ._adfg ._bde );
_gebfg !=nil {return _gebfg ;};};if _abd ._cbef ._fbg {if _badg :=_ccgdb .ReadProperty (&_abd ._adfg ._gfec );_badg !=nil {return _badg ;};};if _abd ._cbef ._begac {if _ccbb :=_ccgdb .ReadProperty (&_abd ._adfg ._dfga );_ccbb !=nil {return _ccbb ;};};if _abd ._cbef ._adg {if _cgga :=_ccgdb .ReadProperty (&_abd ._adfg ._cfg );
_cgga !=nil {return _cgga ;};};if _abd ._cbef ._eaea {if _fbd :=_ccgdb .ReadProperty (&_abd ._adfg ._dcac );_fbd !=nil {return _fbd ;};};if _abd ._cbef ._ebac {if _fbe :=_ccgdb .ReadProperty (&_abd ._adfg ._cbeb );_fbe !=nil {return _fbe ;};};if _abd ._cbef ._fgbf {var _gdgf uint32 ;
if _gffc :=_ccgdb .ReadProperty (&_gdgf );_gffc !=nil {return _gffc ;};_abd ._adfg ._add ,_abd ._adfg ._adfca =_agf (_gdgf );};return nil ;};type morphDataColumnInfoPropMask struct{};
2022-02-05 13:05:36 +00:00
2024-05-22 00:21:11 +00:00
// GetBackColor gets a button text color value for a system palette from a label control.
func (_ffgf *LabelControl )GetBackColor ()uint32 {return _ffgf ._dbf ._bfg };
2023-04-15 17:27:31 +00:00
2024-05-22 00:21:11 +00:00
// SetBackColor sets a button text color value from a system palette for a spinButton control.
func (_gfce *SpinButtonControl )SetBackColor (backColor uint32 ){_gfce ._degc ._febd =true ;_gfce ._cabc ._bbgde =backColor ;};type imagePropMask struct{_bebe bool ;_dea bool ;_fbcd bool ;_eaff bool ;_bga bool ;_gfe bool ;_gdd bool ;_acgb bool ;_begb bool ;
_ccbd bool ;_dbd bool ;_dbbc bool ;_feb bool ;};func (_bcb *controlBase )writeTheRest (_bgb *_gd .Writer )error {_ ,_aaf :=_bgb .Write (_bcb ._eaa );return _aaf ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// GetHeight returns height of the ScrollBar in HIMETRIC (0.01mm)
func (_febg *ScrollBarControl )GetHeight ()uint32 {return _febg ._deba ._dcaf };type imageDataBlock struct{_bfb uint32 ;_eac uint32 ;_ebaf byte ;_ccaa uint8 ;_fgac byte ;_ggb byte ;_eedg uint16 ;_bafe byte ;_bega uint32 ;_gcf uint16 ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// GetBackColor gets a button text color value for a system palette from a scrollBar control.
func (_bcba *ScrollBarControl )GetBackColor ()uint32 {return _bcba ._fff ._fcbb };
2023-12-28 15:53:06 +00:00
2024-05-22 00:21:11 +00:00
// SetWidth sets width of the Label in HIMETRIC (0.01mm)
func (_ecb *LabelControl )SetWidth (width uint32 ){_ecb ._egdgc ._eeb =true ;_ecb ._cgc ._cadb =width };
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetForeColor sets a button text color value from a system palette for a scrollBar control.
func (_bcf *ScrollBarControl )SetForeColor (foreColor uint32 ){_bcf ._abbf ._efde =true ;_bcf ._fff ._ggbc =foreColor ;};type streamData struct{_agab *guidAndPicture ;_gcgf *guidAndPicture ;};func _gef (_gc *_dff .Reader )(string ,error ){_bed ,_fg :=_gc .GetEntry ("\u0043o\u006d\u0070\u004f\u0062\u006a");
if _fg !=nil {return "",_fg ;};_dbb :=make ([]byte ,_bed .Size );_ ,_fg =_bed .Read (_dbb );if _fg !=nil {return "",_fg ;};_cad :=_g .Split (_dbb ,[]byte ("\u002e"));if len (_cad )< 2{return "",_e .New ("\u0055\u006e\u006bn\u006f\u0077\u006e\u0020\u0066\u006f\u0072\u006d");
};return string (_cad [len (_cad )-2]),nil ;};func (_cgf *CommandButtonControl )readExtraDataBlock (_feef *_gd .Reader )error {_cgf ._bbgd =&commandButtonExtraDataBlock {};if _cgf ._fd ._aeg > 0{_abf ,_ccb :=_feef .ReadStringProperty (_cgf ._fd ._aeg );
if _ccb !=nil {return _ccb ;};_cgf ._bbgd ._egdb =_abf ;};if _cgf ._fee ._aec {var _bbca uint64 ;if _dgb :=_feef .ReadPairProperty (&_bbca );_dgb !=nil {return _dgb ;};_cgf ._bbgd ._ead =uint32 (_bbca );_cgf ._bbgd ._cde =uint32 (_bbca >>32);};return nil ;
};
2023-12-28 15:53:06 +00:00
2024-05-22 00:21:11 +00:00
// SetPosition sets a button position value.
func (_ccfc *ScrollBarControl )SetPosition (position int32 ){_ccfc ._abbf ._adaa =true ;_ccfc ._fff ._ggfe =position ;};func (_bag *controlBase )getPictureBytes ()[]byte {return _bag ._aae ._gcgf .getStdPictureBytes ()};func (_acfc *SpinButtonControl )writeExtraDataBlock (_dfc *_gd .Writer )error {if _acfc ._degc ._gca {_eacg :=uint64 (_acfc ._ddge ._egbb )<<32|uint64 (_acfc ._ddge ._bfad );
if _eddf :=_dfc .WritePropertyNoAlign (_eacg );_eddf !=nil {return _eddf ;};};return nil ;};
2023-12-28 15:53:06 +00:00
2024-05-22 00:21:11 +00:00
// CheckBoxDataControl is a representation of a check box ActiveX form.
type CheckBoxDataControl struct{*morphDataControlBoolValue };func (_fce *controlBase )setMouseIconBytes (_gbd []byte ){if _fce ._aae ._agab ==nil {_fce ._aae ._agab =&guidAndPicture {};};_fce ._aae ._agab .setStdPictureBytes (_gbd );};func (_ccda *ImageControl )readExtraDataBlock (_cdef *_gd .Reader )error {_ccda ._aeba =&imageExtraDataBlock {};
if _ccda ._beb ._acgb {var _bcc uint64 ;if _ccec :=_cdef .ReadPairProperty (&_bcc );_ccec !=nil {return _ccec ;};_ccda ._aeba ._bbbg =uint32 (_bcc );_ccda ._aeba ._agb =uint32 (_bcc >>32);};return nil ;};func (_feag *morphDataControl )writeDataBlock (_dffa *_gd .Writer )error {if _feag ._cbef ._aag {if _egac :=_dffa .WriteProperty (_feag ._adfg ._aea );
_egac !=nil {return _egac ;};};if _feag ._cbef ._febc {if _gfef :=_dffa .WriteProperty (_feag ._adfg ._gdg );_gfef !=nil {return _gfef ;};};if _feag ._cbef ._eggg {if _ecbe :=_dffa .WriteProperty (_feag ._adfg ._bgeb );_ecbe !=nil {return _ecbe ;};};if _feag ._cbef ._adef {if _fada :=_dffa .WriteProperty (_feag ._adfg ._cgbg );
_fada !=nil {return _fada ;};};if _feag ._cbef ._eded {if _bgac :=_dffa .WriteProperty (_feag ._adfg ._deea );_bgac !=nil {return _bgac ;};};if _feag ._cbef ._fea {if _ggf :=_dffa .WriteProperty (_feag ._adfg ._gfca );_ggf !=nil {return _ggf ;};};if _feag ._cbef ._ffce {if _feca :=_dffa .WriteProperty (_feag ._adfg ._effd );
_feca !=nil {return _feca ;};};if _feag ._cbef ._cdf {if _cgcb :=_dffa .WriteProperty (_feag ._adfg ._aegd );_cgcb !=nil {return _cgcb ;};};if _feag ._cbef ._aceb {if _ecea :=_dffa .WriteProperty (_feag ._adfg ._ffe );_ecea !=nil {return _ecea ;};};if _feag ._cbef ._fbf {if _dfgc :=_dffa .WriteProperty (_feag ._adfg ._cadg );
_dfgc !=nil {return _dfgc ;};};if _feag ._cbef ._cfe {if _ceg :=_dffa .WriteProperty (_feag ._adfg ._gfcae );_ceg !=nil {return _ceg ;};};if _feag ._cbef ._gebf {if _gefg :=_dffa .WriteProperty (_feag ._adfg ._ece );_gefg !=nil {return _gefg ;};};if _feag ._cbef ._fdef {if _egfa :=_dffa .WriteProperty (_feag ._adfg ._aad );
_egfa !=nil {return _egfa ;};};if _feag ._cbef ._aabg {if _efdb :=_dffa .WriteProperty (_feag ._adfg ._gfcd );_efdb !=nil {return _efdb ;};};if _feag ._cbef ._ddefb {if _ccfg :=_dffa .WriteProperty (_feag ._adfg ._bfac );_ccfg !=nil {return _ccfg ;};};
if _feag ._cbef ._cgde {if _ced :=_dffa .WriteProperty (_feag ._adfg ._baa );_ced !=nil {return _ced ;};};if _feag ._cbef ._babb {if _bfd :=_dffa .WriteProperty (_feag ._adfg ._ffdg );_bfd !=nil {return _bfd ;};};if _feag ._cbef ._bea {if _bgbe :=_dffa .WriteProperty (_feag ._adfg ._afdb );
_bgbe !=nil {return _bgbe ;};};if _feag ._cbef ._dccbc {if _dcdfc :=_dffa .WriteProperty (_feag ._adfg ._ebag );_dcdfc !=nil {return _dcdfc ;};};if _feag ._cbef ._fgce {if _dage :=_dffa .WriteProperty (_feag ._adfg ._dge );_dage !=nil {return _dage ;};
};if _feag ._cbef ._edce {_bggf :=_efgb (_feag ._adfg ._dgdg ,_feag ._adfg ._bbf );if _fcec :=_dffa .WriteProperty (_bggf );_fcec !=nil {return _fcec ;};};if _feag ._cbef ._cbad {_geee :=_efgb (_feag ._adfg ._fgfc ,_feag ._adfg ._cgad );if _edde :=_dffa .WriteProperty (_geee );
_edde !=nil {return _edde ;};};if _feag ._cbef ._bcbf {if _bba :=_dffa .WriteProperty (_feag ._adfg ._bde );_bba !=nil {return _bba ;};};if _feag ._cbef ._fbg {if _ebd :=_dffa .WriteProperty (_feag ._adfg ._gfec );_ebd !=nil {return _ebd ;};};if _feag ._cbef ._begac {if _egff :=_dffa .WriteProperty (_feag ._adfg ._dfga );
_egff !=nil {return _egff ;};};if _feag ._cbef ._adg {if _gbee :=_dffa .WriteProperty (_feag ._adfg ._cfg );_gbee !=nil {return _gbee ;};};if _feag ._cbef ._eaea {if _cda :=_dffa .WriteProperty (_feag ._adfg ._dcac );_cda !=nil {return _cda ;};};if _feag ._cbef ._ebac {if _dega :=_dffa .WriteProperty (_feag ._adfg ._cbeb );
_dega !=nil {return _dega ;};};if _feag ._cbef ._fgbf {_geeec :=_efgb (_feag ._adfg ._adfca ,_feag ._adfg ._add );if _dcb :=_dffa .WriteProperty (_geeec );_dcb !=nil {return _dcb ;};};return _dffa .AlignLength (4);};const _dce =1;
2023-12-28 15:53:06 +00:00
2024-05-22 00:21:11 +00:00
// SetHeight sets height of the SpinButton in HIMETRIC (0.01mm)
func (_cabe *SpinButtonControl )SetHeight (height uint32 ){_cabe ._degc ._gca =true ;_cabe ._ddge ._bfad =height ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// GetWidth returns width of the Label in HIMETRIC (0.01mm)
func (_dfd *LabelControl )GetWidth ()uint32 {return _dfd ._cgc ._cadb };
2023-08-06 17:57:53 +00:00
2024-05-22 00:21:11 +00:00
// GetCaption gets a caption string from a morph control.
func (_gbag *morphDataControl )GetCaption ()string {if _gbag ._efgd &&_gbag ._cbef ._cbad {return _gbag ._eabc ._dab ;};return "";};func _efgb (_agd uint32 ,_dc bool )uint32 {if _agd ==0{return 0;};if _dc {_agd |=1<<31;};return _agd ;};func (_gbdaa *ScrollBarControl )writeDataBlock (_cggd *_gd .Writer )error {if _gbdaa ._abbf ._efde {if _fae :=_cggd .WriteProperty (_gbdaa ._fff ._ggbc );
_fae !=nil {return _fae ;};};if _gbdaa ._abbf ._eee {if _bbea :=_cggd .WriteProperty (_gbdaa ._fff ._fcbb );_bbea !=nil {return _bbea ;};};if _gbdaa ._abbf ._ggef {if _gbcd :=_cggd .WriteProperty (_gbdaa ._fff ._egc );_gbcd !=nil {return _gbcd ;};};if _gbdaa ._abbf ._cdfa {if _gad :=_cggd .WriteProperty (_gbdaa ._fff ._gbaf );
_gad !=nil {return _gad ;};};if _gbdaa ._abbf ._facf {if _geba :=_cggd .WriteProperty (_gbdaa ._fff ._daged );_geba !=nil {return _geba ;};};if _gbdaa ._abbf ._edf {if _cbb :=_cggd .WriteProperty (_gbdaa ._fff ._gdbc );_cbb !=nil {return _cbb ;};};if _gbdaa ._abbf ._adaa {if _fegd :=_cggd .WriteProperty (_gbdaa ._fff ._ggfe );
_fegd !=nil {return _fegd ;};};if _gbdaa ._abbf ._dgea {if _acaa :=_cggd .WriteProperty (_gbdaa ._fff ._cebc );_acaa !=nil {return _acaa ;};};if _gbdaa ._abbf ._fgfcc {if _dcdd :=_cggd .WriteProperty (_gbdaa ._fff ._aacd );_dcdd !=nil {return _dcdd ;};
};if _gbdaa ._abbf ._ffa {if _agbd :=_cggd .WriteProperty (_gbdaa ._fff ._dgad );_agbd !=nil {return _agbd ;};};if _gbdaa ._abbf ._adedd {if _fcd :=_cggd .WriteProperty (_gbdaa ._fff ._bbaf );_fcd !=nil {return _fcd ;};};if _gbdaa ._abbf ._bdbb {if _bbgb :=_cggd .WriteProperty (_gbdaa ._fff ._ded );
_bbgb !=nil {return _bbgb ;};};if _gbdaa ._abbf ._cfgc {if _facdb :=_cggd .WriteProperty (_gbdaa ._fff ._edfg );_facdb !=nil {return _facdb ;};};if _gbdaa ._abbf ._cdff {if _gbea :=_cggd .WriteProperty (_gbdaa ._fff ._gbf );_gbea !=nil {return _gbea ;};
};if _gbdaa ._abbf ._eada {if _aegg :=_cggd .WriteProperty (_gbdaa ._fff ._fcgb );_aegg !=nil {return _aegg ;};};return _cggd .AlignLength (4);};
2022-01-15 21:17:38 +00:00
2024-05-08 13:54:39 +00:00
// SetCaption sets a caption string for a label control.
2024-05-22 00:21:11 +00:00
func (_gff *LabelControl )SetCaption (caption string ){_gff ._egdgc ._gbgd =true ;_gff ._dbf ._ddag =uint32 (len (caption ));_gff ._cgc ._gbaa =caption ;};func (_edb *ImageControl )writeDataBlock (_efdf *_gd .Writer )error {if _edb ._beb ._dea {if _gbg :=_efdf .WriteProperty (_edb ._dcg ._bfb );
_gbg !=nil {return _gbg ;};};if _edb ._beb ._fbcd {if _fbac :=_efdf .WriteProperty (_edb ._dcg ._eac );_fbac !=nil {return _fbac ;};};if _edb ._beb ._eaff {if _dcd :=_efdf .WriteProperty (_edb ._dcg ._ebaf );_dcd !=nil {return _dcd ;};};if _edb ._beb ._bga {if _gaa :=_efdf .WriteProperty (_edb ._dcg ._ccaa );
_gaa !=nil {return _gaa ;};};if _edb ._beb ._gfe {if _bdfe :=_efdf .WriteProperty (_edb ._dcg ._fgac );_bdfe !=nil {return _bdfe ;};};if _edb ._beb ._gdd {if _gcd :=_efdf .WriteProperty (_edb ._dcg ._ggb );_gcd !=nil {return _gcd ;};};if _edb ._beb ._begb {if _ccf :=_efdf .WriteProperty (_edb ._dcg ._eedg );
_ccf !=nil {return _ccf ;};};if _edb ._beb ._ccbd {if _eeae :=_efdf .WriteProperty (_edb ._dcg ._bafe );_eeae !=nil {return _eeae ;};};if _edb ._beb ._dbbc {if _fbcdf :=_efdf .WriteProperty (_edb ._dcg ._bega );_fbcdf !=nil {return _fbcdf ;};};if _edb ._beb ._feb {if _ccdd :=_efdf .WriteProperty (_edb ._dcg ._gcf );
_ccdd !=nil {return _ccdd ;};};return _efdf .AlignLength (4);};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// GetHeight returns height of the CommandButton in HIMETRIC (0.01mm)
func (_gdc *CommandButtonControl )GetHeight ()uint32 {return _gdc ._bbgd ._ead };func (_cec *SpinButtonControl )readDataBlock (_dgae *_gd .Reader )error {_cec ._cabc =&spinButtonDataBlock {};if _cec ._degc ._cdffe {if _afdf :=_dgae .ReadProperty (&_cec ._cabc ._ccfa );
_afdf !=nil {return _afdf ;};};if _cec ._degc ._febd {if _deee :=_dgae .ReadProperty (&_cec ._cabc ._bbgde );_deee !=nil {return _deee ;};};if _cec ._degc ._dbdd {if _fgbda :=_dgae .ReadProperty (&_cec ._cabc ._aeece );_fgbda !=nil {return _fgbda ;};};
if _cec ._degc ._bee {if _ebfe :=_dgae .ReadProperty (&_cec ._cabc ._acbb );_ebfe !=nil {return _ebfe ;};};if _cec ._degc ._fdd {if _ffee :=_dgae .ReadProperty (&_cec ._cabc ._ddgb );_ffee !=nil {return _ffee ;};};if _cec ._degc ._cgbgf {if _cdgae :=_dgae .ReadProperty (&_cec ._cabc ._cgba );
_cdgae !=nil {return _cdgae ;};};if _cec ._degc ._caf {if _aabd :=_dgae .ReadProperty (&_cec ._cabc ._ebabf );_aabd !=nil {return _aabd ;};};if _cec ._degc ._ffda {if _ccea :=_dgae .ReadProperty (&_cec ._cabc ._edec );_ccea !=nil {return _ccea ;};};if _cec ._degc ._ggce {if _acec :=_dgae .ReadProperty (&_cec ._cabc ._aefe );
_acec !=nil {return _acec ;};};if _cec ._degc ._aaa {if _bbdgd :=_dgae .ReadProperty (&_cec ._cabc ._aaga );_bbdgd !=nil {return _bbdgd ;};};if _cec ._degc ._dbfa {if _cefd :=_dgae .ReadProperty (&_cec ._cabc ._dggg );_cefd !=nil {return _cefd ;};};if _cec ._degc ._adbe {if _afc :=_dgae .ReadProperty (&_cec ._cabc ._cdga );
_afc !=nil {return _afc ;};};if _cec ._degc ._gbab {if _fecaa :=_dgae .ReadProperty (&_cec ._cabc ._gefc );_fecaa !=nil {return _fecaa ;};};return nil ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// GetCaption gets a caption string from a label control.
func (_abc *LabelControl )GetCaption ()string {return _abc ._cgc ._gbaa };
2022-01-15 21:17:38 +00:00
2024-05-08 13:54:39 +00:00
// GetForeColor gets a button text color value for a system palette from a label control.
2024-05-22 00:21:11 +00:00
func (_dcde *LabelControl )GetForeColor ()uint32 {return _dcde ._dbf ._ccae };
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// CommandButtonControl is a representation of a commandButton ActiveX form.
type CommandButtonControl struct{controlBase ;_fee *commandButtonPropMask ;_fd *commandButtonDataBlock ;_bbgd *commandButtonExtraDataBlock ;_af *streamData ;};const (FmPictureAlignmentTopLeft FmPictureAlignment =iota ;FmPictureAlignmentTopRight ;FmPictureAlignmentCenter ;
FmPictureAlignmentBottomLeft ;FmPictureAlignmentBottomRight ;);type commandButtonExtraDataBlock struct{_cde uint32 ;_ead uint32 ;_egdb string ;};const _dcdf =3;
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetForeColor sets a button text color value from a system palette for a label control.
func (_fad *LabelControl )SetForeColor (foreColor uint32 ){_fad ._egdgc ._bca =true ;_fad ._dbf ._ccae =foreColor ;};func (_cg *CommandButtonControl )readDataBlock (_geae *_gd .Reader )error {_cg ._fd =&commandButtonDataBlock {};if _cg ._fee ._aef {if _cbe :=_geae .ReadProperty (&_cg ._fd ._dbea );
_cbe !=nil {return _cbe ;};};if _cg ._fee ._gdb {if _bec :=_geae .ReadProperty (&_cg ._fd ._afb );_bec !=nil {return _bec ;};};if _cg ._fee ._bg {if _eef :=_geae .ReadProperty (&_cg ._fd ._eae );_eef !=nil {return _eef ;};};if _cg ._fee ._acafb {var _dda uint32 ;
if _ege :=_geae .ReadProperty (&_dda );_ege !=nil {return _ege ;};_cg ._fd ._cd ,_cg ._fd ._aeg =_agf (_dda );};if _cg ._fee ._afg {if _cgg :=_geae .ReadProperty (&_cg ._fd ._efce );_cgg !=nil {return _cgg ;};};if _cg ._fee ._egdf {if _aeec :=_geae .ReadProperty (&_cg ._fd ._ffg );
_aeec !=nil {return _aeec ;};};if _cg ._fee ._fge {if _dae :=_geae .ReadProperty (&_cg ._fd ._adea );_dae !=nil {return _dae ;};};if _cg ._fee ._aee {if _bbc :=_geae .ReadProperty (&_cg ._fd ._aba );_bbc !=nil {return _bbc ;};};if _cg ._fee ._ade {if _ga :=_geae .ReadProperty (&_cg ._fd ._fcf );
_ga !=nil {return _ga ;};};return nil ;};
2023-08-06 17:57:53 +00:00
2024-05-08 13:54:39 +00:00
// SetMin sets a button min value.
2024-05-22 00:21:11 +00:00
func (_bbcfa *SpinButtonControl )SetMin (min int32 ){_bbcfa ._degc ._bee =true ;_bbcfa ._cabc ._acbb =min ;};func (_fgfcg *morphDataControl )writeColumnInfoDataBlock (_gge *_gd .Writer )error {return nil };func (_gac *controlBase )readTheRest (_fcfc *_gd .Reader )error {_ddgd :=_g .NewBuffer ([]byte {});
_ ,_agff :=_df .Copy (_ddgd ,_fcfc );if _agff !=nil {return _agff ;};_gac ._eaa =_ddgd .Bytes ();return nil ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetWidth sets width of the morphDataControl in HIMETRIC (0.01mm)
func (_bcca *morphDataControl )SetWidth (width uint32 ){_bcca ._cbef ._agge =true ;_bcca ._eabc ._eccd =width ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetValue sets a value for a control which value can be represented as a string.
func (_adfc *morphDataControlStringValue )SetValue (value string ){_adfc .setValueString (value )};
2023-09-16 17:56:36 +00:00
2024-05-22 00:21:11 +00:00
// GetBackColor gets a button text color value for a system palette from a commandButton control.
func (_bbb *CommandButtonControl )GetBackColor ()uint32 {return _bbb ._fd ._afb };func (_ccbg *SpinButtonControl )writeDataBlock (_gbfd *_gd .Writer )error {if _ccbg ._degc ._cdffe {if _abgg :=_gbfd .WriteProperty (_ccbg ._cabc ._ccfa );_abgg !=nil {return _abgg ;
};};if _ccbg ._degc ._febd {if _cfcf :=_gbfd .WriteProperty (_ccbg ._cabc ._bbgde );_cfcf !=nil {return _cfcf ;};};if _ccbg ._degc ._dbdd {if _fegef :=_gbfd .WriteProperty (_ccbg ._cabc ._aeece );_fegef !=nil {return _fegef ;};};if _ccbg ._degc ._bee {if _gedg :=_gbfd .WriteProperty (_ccbg ._cabc ._acbb );
_gedg !=nil {return _gedg ;};};if _ccbg ._degc ._fdd {if _dcgd :=_gbfd .WriteProperty (_ccbg ._cabc ._ddgb );_dcgd !=nil {return _dcgd ;};};if _ccbg ._degc ._cgbgf {if _ecaf :=_gbfd .WriteProperty (_ccbg ._cabc ._cgba );_ecaf !=nil {return _ecaf ;};};if _ccbg ._degc ._caf {if _efad :=_gbfd .WriteProperty (_ccbg ._cabc ._ebabf );
_efad !=nil {return _efad ;};};if _ccbg ._degc ._ffda {if _egb :=_gbfd .WriteProperty (_ccbg ._cabc ._edec );_egb !=nil {return _egb ;};};if _ccbg ._degc ._ggce {if _eacb :=_gbfd .WriteProperty (_ccbg ._cabc ._aefe );_eacb !=nil {return _eacb ;};};if _ccbg ._degc ._aaa {if _gcfcc :=_gbfd .WriteProperty (_ccbg ._cabc ._aaga );
_gcfcc !=nil {return _gcfcc ;};};if _ccbg ._degc ._dbfa {if _cgaa :=_gbfd .WriteProperty (_ccbg ._cabc ._dggg );_cgaa !=nil {return _cgaa ;};};if _ccbg ._degc ._adbe {if _edded :=_gbfd .WriteProperty (_ccbg ._cabc ._cdga );_edded !=nil {return _edded ;
};};if _ccbg ._degc ._gbab {if _ddaa :=_gbfd .WriteProperty (_ccbg ._cabc ._gefc );_ddaa !=nil {return _ddaa ;};};return _gbfd .AlignLength (4);};type scrollBarExtraDataBlock struct{_cdec uint32 ;_dcaf uint32 ;};
2023-12-28 15:53:06 +00:00
2024-05-22 00:21:11 +00:00
// FmPictureAlignment represents one of the five picture aignments according to MS-OFORMS document.
type FmPictureAlignment byte ;
// Control represents an ActiveX control wrapper.
type Control struct{TargetAttr string ;Ocx *_f .Ocx ;Choice *ControlChoice ;_ed string ;_ge uint8 ;_b uint8 ;_ad uint16 ;};
// GetMin gets a button min value.
func (_dfgad *ScrollBarControl )GetMin ()int32 {return _dfgad ._fff ._daged };func (_bcbc *guidAndPicture )export (_ggge *_gd .Writer )error {if _ ,_gfad :=_df .Copy (_ggge ,_g .NewBuffer (_bcbc ._faa ));_gfad !=nil {return _gfad ;};if _bad :=_ggge .WriteProperty (_bcbc ._deb ._abg );
_bad !=nil {return _bad ;};if _ceb :=_ggge .WriteProperty (_bcbc ._deb ._gbe );_ceb !=nil {return _ceb ;};_ ,_fgf :=_df .Copy (_ggge ,_bcbc ._deb ._faf );if _fgf !=nil {return _fgf ;};return nil ;};
2022-04-09 14:27:46 +00:00
2024-05-08 13:54:39 +00:00
// SetHeight sets height of the ScrollBar in HIMETRIC (0.01mm)
2024-05-22 00:21:11 +00:00
func (_ebbd *ScrollBarControl )SetHeight (height uint32 ){_ebbd ._abbf ._cag =true ;_ebbd ._deba ._dcaf =height ;};
2022-04-09 14:27:46 +00:00
2024-05-22 00:21:11 +00:00
// GetWidth returns width of the ScrollBar in HIMETRIC (0.01mm)
func (_egdfa *ScrollBarControl )GetWidth ()uint32 {return _egdfa ._deba ._cdec };func (_ddg *CommandButtonControl )readPropMask (_bcg *_gd .Reader )error {var _da uint32 ;if _aab :=_a .Read (_bcg ,_a .LittleEndian ,&_da );_aab !=nil {return _aab ;};_ddg ._fee =&commandButtonPropMask {};
_ddg ._fee ._aef ,_da =_gd .PopRightUI32 (_da );_ddg ._fee ._gdb ,_da =_gd .PopRightUI32 (_da );_ddg ._fee ._bg ,_da =_gd .PopRightUI32 (_da );_ddg ._fee ._acafb ,_da =_gd .PopRightUI32 (_da );_ddg ._fee ._afg ,_da =_gd .PopRightUI32 (_da );_ddg ._fee ._aec ,_da =_gd .PopRightUI32 (_da );
_ddg ._fee ._egdf ,_da =_gd .PopRightUI32 (_da );_ddg ._fee ._fge ,_da =_gd .PopRightUI32 (_da );_ddg ._fee ._aee ,_da =_gd .PopRightUI32 (_da );_ddg ._fee ._eed ,_da =_gd .PopRightUI32 (_da );_ddg ._fee ._ade ,_da =_gd .PopRightUI32 (_da );return nil ;
};func (_cfb *guidAndPicture )setStdPictureBytes (_cca []byte ){if _cca ==nil {return ;};if _cfb ._faa ==nil {_cfb ._faa =_eag ;};if _cfb ._deb ==nil {_cfb ._deb =&stdPicture {_abg :_beg };};_cfb ._deb ._gbe =uint32 (len (_cca ));_cfb ._deb ._faf =_g .NewBuffer (_cca );
};func (_adbg *controlBase )getMouseIconBytes ()[]byte {return _adbg ._aae ._agab .getStdPictureBytes ()};type morphDataControl struct{controlBase ;_cbef *morphDataPropMask ;_adfg *morphDataDataBlock ;_eabc *morphDataExtraDataBlock ;_ebb *streamData ;_ddef *morphDataColumnInfo ;
_dgg *morphDataColumnInfoPropMask ;_fadd *morphDataColumnInfoDataBlock ;};type morphDataColumnInfo struct{};func (_ebg *ImageControl )writeExtraDataBlock (_bebeg *_gd .Writer )error {if _ebg ._beb ._acgb {_ede :=uint64 (_ebg ._aeba ._agb )<<32|uint64 (_ebg ._aeba ._bbbg );
if _fdc :=_bebeg .WritePropertyNoAlign (_ede );_fdc !=nil {return _fdc ;};};return nil ;};
2022-12-06 11:56:49 +00:00
2024-05-22 00:21:11 +00:00
// SpinButtonControl is a representation of a spinButton ActiveX form.
type SpinButtonControl struct{controlBase ;_degc *spinButtonPropMask ;_cabc *spinButtonDataBlock ;_ddge *spinButtonExtraDataBlock ;_ceea *streamData ;};func (_gda *morphDataControl )writePropMask (_cacd *_gd .Writer )error {_gdbg :=uint64 (0);_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._aag );
_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._febc );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._eggg );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._adef );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._eded );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._fea );
_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._ffce );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._cdf );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._agge );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._aceb );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._fbf );
_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._cfe );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._gebf );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._fdef );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._aabg );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._ddefb );
_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._cgde );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._babb );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._bea );_gdbg >>=1;_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._dccbc );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._fgce );
_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._edce );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._cbad );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._bcbf );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._fbg );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._begac );
_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._adg );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._eaea );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._ebac );_gdbg >>=1;_gdbg =_gd .PushLeftUI64 (_gdbg ,true );_gdbg =_gd .PushLeftUI64 (_gdbg ,_gda ._cbef ._fgbf );
_gdbg >>=31;return _a .Write (_cacd ,_a .LittleEndian ,_gdbg );};func (_aac *morphDataControl )readColumnInfo (_def *_gd .Reader )error {return nil };
2022-04-09 14:27:46 +00:00
2024-05-22 00:21:11 +00:00
// GetPosition gets a button position value.
func (_aaefa *ScrollBarControl )GetPosition ()int32 {return _aaefa ._fff ._ggfe };func (_ggba *morphDataControl )writeColumnInfo (_dded *_gd .Writer )error {return nil };func (_ggga *guidAndPicture )importFromReader (_aeb *_gd .Reader )error {_efff :=_g .NewBuffer ([]byte {});
if _ ,_abb :=_df .CopyN (_efff ,_aeb ,int64 (_ebf ));_abb !=nil {return _abb ;};_fbc :=_efff .Bytes ();for _dffe :=0;_dffe < _ebf ;_dffe ++{if _fbc [_dffe ]!=_eag [_dffe ]{return _c .Errorf ("\u0049\u006e\u0076\u0061\u006c\u0069d\u0020\u0047\u0055\u0049\u0044\u0020\u0076\u0061\u006c\u0075\u0065\u0020\u0025v\u0020\u0061\u0074\u0020\u0069\u006e\u0064e\u0078\u0020\u0025\u0076",_fbc [_dffe ],_dffe );
};};_ggga ._faa =_fbc ;_ggga ._deb =&stdPicture {};if _gde :=_aeb .ReadProperty (&_ggga ._deb ._abg );_gde !=nil {return _gde ;};if _ggga ._deb ._abg !=_beg {return _c .Errorf ("\u0049\u006e\u0076\u0061li\u0064\u0020\u0070\u0072\u0065\u0061\u006d\u0062\u006c\u0065\u0020\u0025\u0076",_ggga ._deb ._abg );
};if _eab :=_aeb .ReadProperty (&_ggga ._deb ._gbe );_eab !=nil {return _eab ;};if _ggga ._deb ._gbe !=0{_fda :=_g .NewBuffer ([]byte {});if _ ,_fca :=_df .Copy (_fda ,_aeb );_fca !=nil {return _fca ;};_ggga ._deb ._faf =_fda ;};return nil ;};
2022-06-27 19:44:23 +00:00
2024-05-22 00:21:11 +00:00
// GetValue gets a value from a control which value can be represented as a string.
func (_dffc *morphDataControlStringValue )GetValue ()string {return _dffc .getValueString ()};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetBackColor sets a button text color value from a system palette for a commandButton control.
func (_agc *CommandButtonControl )SetBackColor (backColor uint32 ){_agc ._fee ._gdb =true ;_agc ._fd ._afb =backColor ;};func (_fbde *morphDataControl )writeExtraDataBlock (_dfgf *_gd .Writer )error {if _fbde ._cbef ._agge {_ddfc :=uint64 (_fbde ._eabc ._eccd )<<32|uint64 (_fbde ._eabc ._acgc );
if _acf :=_dfgf .WritePropertyNoAlign (_ddfc );_acf !=nil {return _acf ;};};if _fbde ._adfg ._dgdg > 0{if _aeca :=_dfgf .WriteStringProperty (_fbde ._eabc ._efe );_aeca !=nil {return _aeca ;};};if _fbde ._adfg ._fgfc > 0{if _dcga :=_dfgf .WriteStringProperty (_fbde ._eabc ._dab );
_dcga !=nil {return _dcga ;};};if _fbde ._adfg ._adfca > 0{if _bebed :=_dfgf .WriteStringProperty (_fbde ._eabc ._fgaf );_bebed !=nil {return _bebed ;};};return nil ;};type morphDataColumnInfoDataBlock struct{};type spinButtonExtraDataBlock struct{_egbb uint32 ;
_bfad uint32 ;};func (_dggge *SpinButtonControl )readExtraDataBlock (_efdfb *_gd .Reader )error {_dggge ._ddge =&spinButtonExtraDataBlock {};if _dggge ._degc ._gca {var _agdg uint64 ;if _fecb :=_efdfb .ReadPairProperty (&_agdg );_fecb !=nil {return _fecb ;
};_dggge ._ddge ._bfad =uint32 (_agdg );_dggge ._ddge ._egbb =uint32 (_agdg >>32);};return nil ;};func (_gffd *morphDataControl )readColumnInfoDataBlock (_aded *_gd .Reader )error {return nil };
2024-05-22 00:21:11 +00:00
// GetPosition gets a button position value.
func (_bbfgb *SpinButtonControl )GetPosition ()int32 {return _bbfgb ._cabc ._cgba };func (_aaef *ImageControl )writePropMask (_abbd *_gd .Writer )error {_ccd :=uint32 (0);_ccd >>=2;_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._bebe );_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._dea );
_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._fbcd );_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._eaff );_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._bga );_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._gfe );_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._gdd );
_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._acgb );_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._begb );_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._ccbd );_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._dbd );_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._dbbc );
_ccd =_gd .PushLeftUI32 (_ccd ,_aaef ._beb ._feb );_ccd >>=17;return _a .Write (_abbd ,_a .LittleEndian ,_ccd );};func (_faddb *morphDataControl )setValueBool (_eaac bool ){_faddb ._cbef ._edce =true ;_faddb ._adfg ._dgdg =1;_faddb ._adfg ._bbf =true ;
_fege :="\u0030";if _eaac {_fege ="\u0031";};_faddb ._eabc ._efe =_fege ;};
2022-02-05 13:05:36 +00:00
2024-05-22 00:21:11 +00:00
// GetBackColor gets a button text color value for a system palette from a spinButton control.
func (_gebab *SpinButtonControl )GetBackColor ()uint32 {return _gebab ._cabc ._bbgde };
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// GetCaption gets a caption string from a commandButton control.
func (_cbag *CommandButtonControl )GetCaption ()string {return _cbag ._bbgd ._egdb };type guidAndPicture struct{_faa []byte ;_deb *stdPicture ;};func (_bgbb *controlBase )readStreamDataMP (_faage *_gd .Reader ,_gae ,_fcbf bool )error {_bgbb ._aae =&streamData {};
if _gae {_bgbb ._aae ._agab =&guidAndPicture {};if _egfc :=_bgbb ._aae ._agab .importFromReader (_faage );_egfc !=nil {return _egfc ;};};if _fcbf {_bgbb ._aae ._gcgf =&guidAndPicture {};if _edca :=_bgbb ._aae ._gcgf .importFromReader (_faage );_edca !=nil {return _edca ;
};};return nil ;};var _eag =[]byte {0x04,0x52,0xE3,0x0B,0x91,0x8F,0xCE,0x11,0x9D,0xE3,0,0xAA,0,0x4B,0xB8,0x51};
// GetWidth returns width of the SpinButton in HIMETRIC (0.01mm)
func (_abge *SpinButtonControl )GetWidth ()uint32 {return _abge ._ddge ._egbb };func (_fga *guidAndPicture )getStdPictureBytes ()[]byte {if _fga !=nil &&_fga ._deb !=nil &&_fga ._deb ._faf !=nil {return _fga ._deb ._faf .Bytes ();};return nil ;};func (_ffd *ImageControl )readPropMask (_daf *_gd .Reader )error {var _dee uint32 ;
if _dcf :=_a .Read (_daf ,_a .LittleEndian ,&_dee );_dcf !=nil {return _dcf ;};_ffd ._beb =&imagePropMask {};_dee >>=2;_ffd ._beb ._bebe ,_dee =_gd .PopRightUI32 (_dee );_ffd ._beb ._dea ,_dee =_gd .PopRightUI32 (_dee );_ffd ._beb ._fbcd ,_dee =_gd .PopRightUI32 (_dee );
_ffd ._beb ._eaff ,_dee =_gd .PopRightUI32 (_dee );_ffd ._beb ._bga ,_dee =_gd .PopRightUI32 (_dee );_ffd ._beb ._gfe ,_dee =_gd .PopRightUI32 (_dee );_ffd ._beb ._gdd ,_dee =_gd .PopRightUI32 (_dee );_ffd ._beb ._acgb ,_dee =_gd .PopRightUI32 (_dee );
_ffd ._beb ._begb ,_dee =_gd .PopRightUI32 (_dee );_ffd ._beb ._ccbd ,_dee =_gd .PopRightUI32 (_dee );_ffd ._beb ._dbd ,_dee =_gd .PopRightUI32 (_dee );_ffd ._beb ._dbbc ,_dee =_gd .PopRightUI32 (_dee );_ffd ._beb ._feb ,_dee =_gd .PopRightUI32 (_dee );
2024-05-08 13:54:39 +00:00
return nil ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// ExportToByteArray makes a byte array from a control as it is stored in .bin files.
func (_aa *Control )ExportToByteArray ()([]byte ,error ){_adf ,_cf :=_dd .Open (_aa ._ed );if _cf !=nil {return nil ,_cf ;};defer _adf .Close ();_fc ,_cf :=_dff .New (_adf );if _cf !=nil {return nil ,_cf ;};_bc :=_gd .NewWriter ();if _bbg :=_a .Write (_bc ,_a .LittleEndian ,&_aa ._ge );
_bbg !=nil {return nil ,_bbg ;};if _bef :=_a .Write (_bc ,_a .LittleEndian ,&_aa ._b );_bef !=nil {return nil ,_bef ;};if _cba :=_a .Write (_bc ,_a .LittleEndian ,uint16 (0));_cba !=nil {return nil ,_cba ;};var _egg error ;if _gfa :=_aa .Choice ;_gfa !=nil {if _gfa .CheckBox !=nil {_egg =_gfa .CheckBox .export (_bc );
}else if _gfa .TextBox !=nil {_egg =_gfa .TextBox .export (_bc );}else if _gfa .ComboBox !=nil {_egg =_gfa .ComboBox .export (_bc );}else if _gfa .ListBox !=nil {_egg =_gfa .ListBox .export (_bc );}else if _gfa .OptionButton !=nil {_egg =_gfa .OptionButton .export (_bc );
}else if _gfa .ToggleButton !=nil {_egg =_gfa .ToggleButton .export (_bc );}else if _gfa .Label !=nil {_egg =_gfa .Label .export (_bc );}else if _gfa .SpinButton !=nil {_egg =_gfa .SpinButton .export (_bc );}else if _gfa .CommandButton !=nil {_egg =_gfa .CommandButton .export (_bc );
}else if _gfa .ScrollBar !=nil {_egg =_gfa .ScrollBar .export (_bc );}else {_egg =_gfa ._ff .writeTheRest (_bc );};};if _egg !=nil {return nil ,_egg ;};if _ddb :=_bc .WriteByteAt (byte (_aa ._ad ),2);_ddb !=nil {return nil ,_ddb ;};if _gg :=_bc .WriteByteAt (byte (_aa ._ad >>8),3);
_gg !=nil {return nil ,_gg ;};_egd ,_cf :=_fc .GetEntry ("\u0063\u006f\u006e\u0074\u0065\u006e\u0074\u0073");if _cf !=nil {return nil ,_cf ;};if _ggg :=_egd .SetEntryContent (_bc .Bytes ());_ggg !=nil {return nil ,_ggg ;};return _fc .Export ();};
2023-09-16 17:56:36 +00:00
2024-05-22 00:21:11 +00:00
// ListBoxDataControl is a representation of a list box ActiveX form.
type ListBoxDataControl struct{*morphDataControlStringValue };
2022-01-15 21:17:38 +00:00
2024-05-08 13:54:39 +00:00
// SetPosition sets a button position value.
2024-05-22 00:21:11 +00:00
func (_afgfa *SpinButtonControl )SetPosition (position int32 ){_afgfa ._degc ._cgbgf =true ;_afgfa ._cabc ._cgba =position ;};func (_eeee *SpinButtonControl )readPropMask (_dec *_gd .Reader )error {var _fcff uint32 ;if _abcc :=_a .Read (_dec ,_a .LittleEndian ,&_fcff );
_abcc !=nil {return _abcc ;};_eeee ._degc =&spinButtonPropMask {};_eeee ._degc ._cdffe ,_fcff =_gd .PopRightUI32 (_fcff );_eeee ._degc ._febd ,_fcff =_gd .PopRightUI32 (_fcff );_eeee ._degc ._dbdd ,_fcff =_gd .PopRightUI32 (_fcff );_eeee ._degc ._gca ,_fcff =_gd .PopRightUI32 (_fcff );
_fcff >>=1;_eeee ._degc ._bee ,_fcff =_gd .PopRightUI32 (_fcff );_eeee ._degc ._fdd ,_fcff =_gd .PopRightUI32 (_fcff );_eeee ._degc ._cgbgf ,_fcff =_gd .PopRightUI32 (_fcff );_eeee ._degc ._caf ,_fcff =_gd .PopRightUI32 (_fcff );_eeee ._degc ._ffda ,_fcff =_gd .PopRightUI32 (_fcff );
_eeee ._degc ._ggce ,_fcff =_gd .PopRightUI32 (_fcff );_eeee ._degc ._aaa ,_fcff =_gd .PopRightUI32 (_fcff );_eeee ._degc ._dbfa ,_fcff =_gd .PopRightUI32 (_fcff );_eeee ._degc ._adbe ,_fcff =_gd .PopRightUI32 (_fcff );_eeee ._degc ._gbab ,_fcff =_gd .PopRightUI32 (_fcff );
return nil ;};func _bdg (_dga *_gd .Reader )(*ImageControl ,error ){_gec :=&ImageControl {};if _fgfg :=_gec .readPropMask (_dga );_fgfg !=nil {return nil ,_fgfg ;};if _bdf :=_gec .readDataBlock (_dga );_bdf !=nil {return nil ,_bdf ;};if _bcd :=_gec .readExtraDataBlock (_dga );
_bcd !=nil {return nil ,_bcd ;};if _dgag :=_gec .readStreamDataPM (_dga ,_gec ._beb ._begb ,_gec ._beb ._feb );_dgag !=nil {return nil ,_dgag ;};if _dgc :=_gec .readTheRest (_dga );_dgc !=nil {return nil ,_dgc ;};return _gec ,nil ;};type labelPropMask struct{_bca bool ;
_bbd bool ;_ebc bool ;_gbgd bool ;_deaa bool ;_eeb bool ;_cgb bool ;_ddgg bool ;_gba bool ;_dfb bool ;_bafc bool ;_ace bool ;_ccdc bool ;};func (_gga *LabelControl )writeExtraDataBlock (_fbbg *_gd .Writer )error {if _gga ._dbf ._ddag > 0{if _befd :=_fbbg .WriteStringProperty (_gga ._cgc ._gbaa );
_befd !=nil {return _befd ;};};if _gga ._egdgc ._eeb {_fgd :=uint64 (_gga ._cgc ._cadb )<<32|uint64 (_gga ._cgc ._afd );if _caa :=_fbbg .WritePropertyNoAlign (_fgd );_caa !=nil {return _caa ;};};return nil ;};
2024-05-08 13:54:39 +00:00
2024-05-22 00:21:11 +00:00
// GetValue gets a value from a control which value can be represented as boolean (on/off).
func (_gce *morphDataControlBoolValue )GetValue ()bool {return _gce .getValueBool ()};
2022-04-09 14:27:46 +00:00
2024-05-22 00:21:11 +00:00
// ImageControl is a representation of an image ActiveX form.
type ImageControl struct{controlBase ;_beb *imagePropMask ;_dcg *imageDataBlock ;_aeba *imageExtraDataBlock ;_dbae *streamData ;};type spinButtonDataBlock struct{_ccfa uint32 ;_bbgde uint32 ;_aeece uint32 ;_acbb int32 ;_ddgb int32 ;_cgba int32 ;_ebabf int32 ;
_edec int32 ;_aefe int32 ;_aaga uint32 ;_dggg uint32 ;_cdga uint16 ;_gefc uint8 ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetHeight sets height of the CommandButton in HIMETRIC (0.01mm)
func (_fec *CommandButtonControl )SetHeight (height uint32 ){_fec ._fee ._aec =true ;_fec ._bbgd ._ead =height ;};func (_afec *ScrollBarControl )readDataBlock (_bbag *_gd .Reader )error {_afec ._fff =&scrollBarDataBlock {};if _afec ._abbf ._efde {if _ddd :=_bbag .ReadProperty (&_afec ._fff ._ggbc );
_ddd !=nil {return _ddd ;};};if _afec ._abbf ._eee {if _afgd :=_bbag .ReadProperty (&_afec ._fff ._fcbb );_afgd !=nil {return _afgd ;};};if _afec ._abbf ._ggef {if _gfag :=_bbag .ReadProperty (&_afec ._fff ._egc );_gfag !=nil {return _gfag ;};};if _afec ._abbf ._cdfa {if _ddgdf :=_bbag .ReadProperty (&_afec ._fff ._gbaf );
_ddgdf !=nil {return _ddgdf ;};};if _afec ._abbf ._facf {if _eadg :=_bbag .ReadProperty (&_afec ._fff ._daged );_eadg !=nil {return _eadg ;};};if _afec ._abbf ._edf {if _aggc :=_bbag .ReadProperty (&_afec ._fff ._gdbc );_aggc !=nil {return _aggc ;};};if _afec ._abbf ._adaa {if _dgge :=_bbag .ReadProperty (&_afec ._fff ._ggfe );
_dgge !=nil {return _dgge ;};};if _afec ._abbf ._dgea {if _eggab :=_bbag .ReadProperty (&_afec ._fff ._cebc );_eggab !=nil {return _eggab ;};};if _afec ._abbf ._fgfcc {if _cee :=_bbag .ReadProperty (&_afec ._fff ._aacd );_cee !=nil {return _cee ;};};if _afec ._abbf ._ffa {if _fgdf :=_bbag .ReadProperty (&_afec ._fff ._dgad );
_fgdf !=nil {return _fgdf ;};};if _afec ._abbf ._adedd {if _afeg :=_bbag .ReadProperty (&_afec ._fff ._bbaf );_afeg !=nil {return _afeg ;};};if _afec ._abbf ._bdbb {if _aeed :=_bbag .ReadProperty (&_afec ._fff ._ded );_aeed !=nil {return _aeed ;};};if _afec ._abbf ._cfgc {if _cbaf :=_bbag .ReadProperty (&_afec ._fff ._edfg );
_cbaf !=nil {return _cbaf ;};};if _afec ._abbf ._cdff {if _ddba :=_bbag .ReadProperty (&_afec ._fff ._gbf );_ddba !=nil {return _ddba ;};};if _afec ._abbf ._eada {if _bbfg :=_bbag .ReadProperty (&_afec ._fff ._fcgb );_bbfg !=nil {return _bbfg ;};};return nil ;
};func _gee (_gfd *_gd .Reader )(*CommandButtonControl ,error ){_fb :=&CommandButtonControl {};if _baf :=_fb .readPropMask (_gfd );_baf !=nil {return nil ,_baf ;};if _gcc :=_fb .readDataBlock (_gfd );_gcc !=nil {return nil ,_gcc ;};if _aca :=_fb .readExtraDataBlock (_gfd );
_aca !=nil {return nil ,_aca ;};if _gggb :=_fb .readStreamDataPM (_gfd ,_fb ._fee ._fge ,_fb ._fee ._ade );_gggb !=nil {return nil ,_gggb ;};if _bdb :=_fb .readTheRest (_gfd );_bdb !=nil {return nil ,_bdb ;};return _fb ,nil ;};func (_fcbfg *controlBase )writeStreamDataPM (_bdge *_gd .Writer )error {if _fcbfg ._aae !=nil {if _fcbfg ._aae ._gcgf !=nil {if _dbca :=_fcbfg ._aae ._gcgf .export (_bdge );
_dbca !=nil {return _dbca ;};};if _fcbfg ._aae ._agab !=nil {if _faeg :=_fcbfg ._aae ._agab .export (_bdge );_faeg !=nil {return _faeg ;};};};return nil ;};func _afe (_bbgdg *_gd .Reader )(*morphDataControl ,error ){_gcfdf :=&morphDataControl {};if _fab :=_gcfdf .readPropMask (_bbgdg );
_fab !=nil {return nil ,_fab ;};if _agcee :=_gcfdf .readDataBlock (_bbgdg );_agcee !=nil {return nil ,_agcee ;};if _ddee :=_gcfdf .readExtraDataBlock (_bbgdg );_ddee !=nil {return nil ,_ddee ;};if _abcf :=_gcfdf .readStreamDataMP (_bbgdg ,_gcfdf ._cbef ._adg ,_gcfdf ._cbef ._eaea );
_abcf !=nil {return nil ,_abcf ;};switch _gcfdf ._adfg ._effd {case _ega ,_dcdf :if _dag :=_gcfdf .readColumnInfo (_bbgdg );_dag !=nil {return nil ,_dag ;};if _aaff :=_gcfdf .readColumnInfoPropMask (_bbgdg );_aaff !=nil {return nil ,_aaff ;};if _gdce :=_gcfdf .readColumnInfoDataBlock (_bbgdg );
_gdce !=nil {return nil ,_gdce ;};};if _geff :=_gcfdf .readTheRest (_bbgdg );_geff !=nil {return nil ,_geff ;};return _gcfdf ,nil ;};
2023-09-16 17:56:36 +00:00
2024-05-22 00:21:11 +00:00
// ImportFromFile makes a Control from a file in a storage.
func ImportFromFile (storagePath string )(*Control ,error ){_eb ,_dg :=_dd .Open (storagePath );if _dg !=nil {return nil ,_dg ;};defer _eb .Close ();_ef ,_dg :=_dff .New (_eb );if _dg !=nil {return nil ,_dg ;};_eg ,_dg :=_gef (_ef );if _dg !=nil {return nil ,_dg ;
};_cc ,_dg :=_ef .GetEntry ("\u0063\u006f\u006e\u0074\u0065\u006e\u0074\u0073");if _dg !=nil {return nil ,_dg ;};_ffc :=make ([]byte ,_cc .Size );_ ,_dg =_cc .Read (_ffc );if _dg !=nil {return nil ,_dg ;};_ba :=&Control {_ed :storagePath };_fa ,_dg :=_gd .NewReader (_ffc );
if _dg !=nil {return nil ,_dg ;};if _db :=_a .Read (_fa ,_a .LittleEndian ,&_ba ._ge );_db !=nil {return nil ,_db ;};if _gf :=_a .Read (_fa ,_a .LittleEndian ,&_ba ._b );_gf !=nil {return nil ,_gf ;};if _efc :=_a .Read (_fa ,_a .LittleEndian ,&_ba ._ad );
_efc !=nil {return nil ,_efc ;};switch _eg {case "\u0043\u0068\u0065\u0063\u006b\u0042\u006f\u0078":_gb ,_efg :=_afe (_fa );if _efg !=nil {return nil ,_efg ;};_gb ._efgd =true ;_ba .Choice =&ControlChoice {CheckBox :&CheckBoxDataControl {&morphDataControlBoolValue {_gb }}};
case "\u0054e\u0078\u0074\u0042\u006f\u0078":_eba ,_efd :=_afe (_fa );if _efd !=nil {return nil ,_efd ;};_eba ._efgd =true ;_ba .Choice =&ControlChoice {TextBox :&TextBoxDataControl {&morphDataControlStringValue {_eba }}};case "\u0043\u006f\u006d\u0062\u006f\u0042\u006f\u0078":_bd ,_bf :=_afe (_fa );
if _bf !=nil {return nil ,_bf ;};_bd ._efgd =true ;_ba .Choice =&ControlChoice {ComboBox :&ComboBoxDataControl {&morphDataControlStringValue {_bd }}};case "\u004ci\u0073\u0074\u0042\u006f\u0078":_fe ,_ca :=_afe (_fa );if _ca !=nil {return nil ,_ca ;};_fe ._efgd =true ;
_ba .Choice =&ControlChoice {ListBox :&ListBoxDataControl {&morphDataControlStringValue {_fe }}};case "\u004f\u0070\u0074i\u006f\u006e\u0042\u0075\u0074\u0074\u006f\u006e":_ac ,_ce :=_afe (_fa );if _ce !=nil {return nil ,_ce ;};_ac ._efgd =true ;_ba .Choice =&ControlChoice {OptionButton :&OptionButtonDataControl {&morphDataControlBoolValue {_ac }}};
case "\u0054\u006f\u0067g\u006c\u0065\u0042\u0075\u0074\u0074\u006f\u006e":_cb ,_de :=_afe (_fa );if _de !=nil {return nil ,_de ;};_cb ._efgd =true ;_ba .Choice =&ControlChoice {ToggleButton :&ToggleButtonDataControl {&morphDataControlBoolValue {_cb }}};
case "\u004c\u0061\u0062e\u006c":_be ,_efcg :=_cbf (_fa );if _efcg !=nil {return nil ,_efcg ;};_ba .Choice =&ControlChoice {Label :_be };case "\u0053\u0070\u0069\u006e\u0042\u0075\u0074\u0074\u006f\u006e":_ab ,_ffcg :=_fdee (_fa );if _ffcg !=nil {return nil ,_ffcg ;
};_ba .Choice =&ControlChoice {SpinButton :_ab };case "\u0043\u006f\u006d\u006d\u0061\u006e\u0064\u0042\u0075\u0074\u0074\u006f\u006e":_egf ,_bb :=_gee (_fa );if _bb !=nil {return nil ,_bb ;};_ba .Choice =&ControlChoice {CommandButton :_egf };case "\u0053c\u0072\u006f\u006c\u006c\u0042\u0061r":_ag ,_feg :=_dafg (_fa );
if _feg !=nil {return nil ,_feg ;};_ba .Choice =&ControlChoice {ScrollBar :_ag };default:_gea :=&controlBase {};if _bfa :=_gea .readTheRest (_fa );_bfa !=nil {return nil ,_bfa ;};_ba .Choice =&ControlChoice {_ff :_gea };};return _ba ,nil ;};type commandButtonDataBlock struct{_dbea uint32 ;
_afb uint32 ;_eae uint32 ;_aeg uint32 ;_cd bool ;_efce uint32 ;_ffg uint8 ;_adea uint16 ;_aba rune ;_fcf uint16 ;};func (_cgfd *LabelControl )readPropMask (_ebcb *_gd .Reader )error {var _eggb uint32 ;if _bge :=_a .Read (_ebcb ,_a .LittleEndian ,&_eggb );
_bge !=nil {return _bge ;};_cgfd ._egdgc =&labelPropMask {};_cgfd ._egdgc ._bca ,_eggb =_gd .PopRightUI32 (_eggb );_cgfd ._egdgc ._bbd ,_eggb =_gd .PopRightUI32 (_eggb );_cgfd ._egdgc ._ebc ,_eggb =_gd .PopRightUI32 (_eggb );_cgfd ._egdgc ._gbgd ,_eggb =_gd .PopRightUI32 (_eggb );
_cgfd ._egdgc ._deaa ,_eggb =_gd .PopRightUI32 (_eggb );_cgfd ._egdgc ._eeb ,_eggb =_gd .PopRightUI32 (_eggb );_cgfd ._egdgc ._cgb ,_eggb =_gd .PopRightUI32 (_eggb );_cgfd ._egdgc ._ddgg ,_eggb =_gd .PopRightUI32 (_eggb );_cgfd ._egdgc ._gba ,_eggb =_gd .PopRightUI32 (_eggb );
_cgfd ._egdgc ._dfb ,_eggb =_gd .PopRightUI32 (_eggb );_cgfd ._egdgc ._bafc ,_eggb =_gd .PopRightUI32 (_eggb );_cgfd ._egdgc ._ace ,_eggb =_gd .PopRightUI32 (_eggb );_cgfd ._egdgc ._ccdc ,_eggb =_gd .PopRightUI32 (_eggb );return nil ;};func (_feab *controlBase )writeStreamDataM (_afba *_gd .Writer )error {if _feab ._aae !=nil {if _feab ._aae ._agab !=nil {if _abeg :=_feab ._aae ._agab .export (_afba );
_abeg !=nil {return _abeg ;};};};return nil ;};func (_bagf *SpinButtonControl )export (_agcef *_gd .Writer )error {if _dceb :=_bagf .writePropMask (_agcef );_dceb !=nil {return _dceb ;};if _fdad :=_bagf .writeDataBlock (_agcef );_fdad !=nil {return _fdad ;
};if _gdfa :=_bagf .writeExtraDataBlock (_agcef );_gdfa !=nil {return _gdfa ;};_bagf ._egde =uint16 (_agcef .Len ()-4);if _efge :=_bagf .writeStreamDataM (_agcef );_efge !=nil {return _efge ;};return _bagf .writeTheRest (_agcef );};func (_fac *CommandButtonControl )writeDataBlock (_ccg *_gd .Writer )error {if _fac ._fee ._aef {if _dfa :=_ccg .WriteProperty (_fac ._fd ._dbea );
_dfa !=nil {return _dfa ;};};if _fac ._fee ._gdb {if _edg :=_ccg .WriteProperty (_fac ._fd ._afb );_edg !=nil {return _edg ;};};if _fac ._fee ._bg {if _bab :=_ccg .WriteProperty (_fac ._fd ._eae );_bab !=nil {return _bab ;};};if _fac ._fee ._acafb {_eaf :=_efgb (_fac ._fd ._aeg ,_fac ._fd ._cd );
if _ecc :=_ccg .WriteProperty (_eaf );_ecc !=nil {return _ecc ;};};if _fac ._fee ._afg {if _fcb :=_ccg .WriteProperty (_fac ._fd ._efce );_fcb !=nil {return _fcb ;};};if _fac ._fee ._egdf {if _facd :=_ccg .WriteProperty (_fac ._fd ._ffg );_facd !=nil {return _facd ;
};};if _fac ._fee ._fge {if _eedd :=_ccg .WriteProperty (_fac ._fd ._adea );_eedd !=nil {return _eedd ;};};if _fac ._fee ._aee {if _gfg :=_ccg .WriteProperty (_fac ._fd ._aba );_gfg !=nil {return _gfg ;};};if _fac ._fee ._ade {if _afa :=_ccg .WriteProperty (_fac ._fd ._fcf );
_afa !=nil {return _afa ;};};return _ccg .AlignLength (4);};func (_bdbba *ScrollBarControl )readPropMask (_ddfa *_gd .Reader )error {var _eceea uint32 ;if _faag :=_a .Read (_ddfa ,_a .LittleEndian ,&_eceea );_faag !=nil {return _faag ;};_bdbba ._abbf =&scrollBarPropMask {};
_bdbba ._abbf ._efde ,_eceea =_gd .PopRightUI32 (_eceea );_bdbba ._abbf ._eee ,_eceea =_gd .PopRightUI32 (_eceea );_bdbba ._abbf ._ggef ,_eceea =_gd .PopRightUI32 (_eceea );_bdbba ._abbf ._cag ,_eceea =_gd .PopRightUI32 (_eceea );_bdbba ._abbf ._cdfa ,_eceea =_gd .PopRightUI32 (_eceea );
_bdbba ._abbf ._facf ,_eceea =_gd .PopRightUI32 (_eceea );_bdbba ._abbf ._edf ,_eceea =_gd .PopRightUI32 (_eceea );_bdbba ._abbf ._adaa ,_eceea =_gd .PopRightUI32 (_eceea );_eceea >>=1;_bdbba ._abbf ._dgea ,_eceea =_gd .PopRightUI32 (_eceea );_bdbba ._abbf ._fgfcc ,_eceea =_gd .PopRightUI32 (_eceea );
_bdbba ._abbf ._ffa ,_eceea =_gd .PopRightUI32 (_eceea );_bdbba ._abbf ._adedd ,_eceea =_gd .PopRightUI32 (_eceea );_bdbba ._abbf ._bdbb ,_eceea =_gd .PopRightUI32 (_eceea );_bdbba ._abbf ._cfgc ,_eceea =_gd .PopRightUI32 (_eceea );_bdbba ._abbf ._cdff ,_eceea =_gd .PopRightUI32 (_eceea );
_bdbba ._abbf ._eada ,_eceea =_gd .PopRightUI32 (_eceea );return nil ;};
2024-05-08 13:54:39 +00:00
2024-05-22 00:21:11 +00:00
// GetHeight returns height of the SpinButton in HIMETRIC (0.01mm)
func (_ggcg *SpinButtonControl )GetHeight ()uint32 {return _ggcg ._ddge ._bfad };func (_bdc *LabelControl )writePropMask (_facc *_gd .Writer )error {_cdc :=uint32 (0);_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._bca );_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._bbd );
_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._ebc );_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._gbgd );_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._deaa );_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._eeb );_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._cgb );
_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._ddgg );_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._gba );_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._dfb );_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._bafc );_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._ace );
_cdc =_gd .PushLeftUI32 (_cdc ,_bdc ._egdgc ._ccdc );_cdc >>=19;return _a .Write (_facc ,_a .LittleEndian ,_cdc );};func (_edd *LabelControl )readDataBlock (_ebea *_gd .Reader )error {_edd ._dbf =&labelDataBlock {};if _edd ._egdgc ._bca {if _dgd :=_ebea .ReadProperty (&_edd ._dbf ._ccae );
_dgd !=nil {return _dgd ;};};if _edd ._egdgc ._bbd {if _efgc :=_ebea .ReadProperty (&_edd ._dbf ._bfg );_efgc !=nil {return _efgc ;};};if _edd ._egdgc ._ebc {if _edc :=_ebea .ReadProperty (&_edd ._dbf ._fcc );_edc !=nil {return _edc ;};};if _edd ._egdgc ._gbgd {var _ddbbf uint32 ;
if _fgef :=_ebea .ReadProperty (&_ddbbf );_fgef !=nil {return _fgef ;};_edd ._dbf ._fgb ,_edd ._dbf ._ddag =_agf (_ddbbf );};if _edd ._egdgc ._deaa {if _badd :=_ebea .ReadProperty (&_edd ._dbf ._gefb );_badd !=nil {return _badd ;};};if _edd ._egdgc ._cgb {if _abca :=_ebea .ReadProperty (&_edd ._dbf ._acb );
_abca !=nil {return _abca ;};};if _edd ._egdgc ._ddgg {if _cac :=_ebea .ReadProperty (&_edd ._dbf ._dgbd );_cac !=nil {return _cac ;};};if _edd ._egdgc ._gba {if _deac :=_ebea .ReadProperty (&_edd ._dbf ._geec );_deac !=nil {return _deac ;};};if _edd ._egdgc ._dfb {if _deae :=_ebea .ReadProperty (&_edd ._dbf ._ebe );
_deae !=nil {return _deae ;};};if _edd ._egdgc ._bafc {if _ddad :=_ebea .ReadProperty (&_edd ._dbf ._bbdc );_ddad !=nil {return _ddad ;};};if _edd ._egdgc ._ace {if _gccc :=_ebea .ReadProperty (&_edd ._dbf ._dgcc );_gccc !=nil {return _gccc ;};};if _edd ._egdgc ._ccdc {if _gcg :=_ebea .ReadProperty (&_edd ._dbf ._ffb );
_gcg !=nil {return _gcg ;};};return nil ;};type labelExtraDataBlock struct{_cadb uint32 ;_afd uint32 ;_gbaa string ;};
2024-05-08 13:54:39 +00:00
2024-05-22 00:21:11 +00:00
// GetMax gets a button max value.
func (_ggc *ScrollBarControl )GetMax ()int32 {return _ggc ._fff ._gdbc };const _aggg =6;
2024-05-08 13:54:39 +00:00
2024-05-22 00:21:11 +00:00
// SetMin sets a button min value.
func (_ffec *ScrollBarControl )SetMin (min int32 ){_ffec ._abbf ._facf =true ;_ffec ._fff ._daged =min };
2023-09-16 17:56:36 +00:00
2024-05-22 00:21:11 +00:00
// SetHeight sets height of the morphDataControl in HIMETRIC (0.01mm)
func (_fcaa *morphDataControl )SetHeight (height uint32 ){_fcaa ._cbef ._agge =true ;_fcaa ._eabc ._acgc =height ;};func _dafg (_egge *_gd .Reader )(*ScrollBarControl ,error ){_eafg :=&ScrollBarControl {};if _ffgc :=_eafg .readPropMask (_egge );_ffgc !=nil {return nil ,_ffgc ;
};if _eaag :=_eafg .readDataBlock (_egge );_eaag !=nil {return nil ,_eaag ;};if _bdee :=_eafg .readExtraDataBlock (_egge );_bdee !=nil {return nil ,_bdee ;};if _gdac :=_eafg .readStreamDataM (_egge ,_eafg ._abbf ._eada );_gdac !=nil {return nil ,_gdac ;
};if _eeag :=_eafg .readTheRest (_egge );_eeag !=nil {return nil ,_eeag ;};return _eafg ,nil ;};func (_dgaf *ScrollBarControl )writeExtraDataBlock (_bbfb *_gd .Writer )error {if _dgaf ._abbf ._cag {_ggd :=uint64 (_dgaf ._deba ._cdec )<<32|uint64 (_dgaf ._deba ._dcaf );
if _daa :=_bbfb .WritePropertyNoAlign (_ggd );_daa !=nil {return _daa ;};};return nil ;};type scrollBarDataBlock struct{_ggbc uint32 ;_fcbb uint32 ;_egc uint32 ;_gbaf uint8 ;_daged int32 ;_gdbc int32 ;_ggfe int32 ;_cebc int32 ;_aacd int32 ;_dgad int32 ;
_bbaf int32 ;_ded uint32 ;_edfg uint32 ;_gbf uint32 ;_fcgb uint16 ;};const _beg uint32 =0x0000746C;
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// ComboBoxDataControl is a representation of a combo box ActiveX form.
type ComboBoxDataControl struct{*morphDataControlStringValue };func (_eaab *LabelControl )readExtraDataBlock (_fbcbe *_gd .Reader )error {_eaab ._cgc =&labelExtraDataBlock {};if _eaab ._dbf ._ddag > 0{_dde ,_gcfd :=_fbcbe .ReadStringProperty (_eaab ._dbf ._ddag );
if _gcfd !=nil {return _gcfd ;};_eaab ._cgc ._gbaa =_dde ;};if _eaab ._egdgc ._eeb {var _gcff uint64 ;if _ebfgc :=_fbcbe .ReadPairProperty (&_gcff );_ebfgc !=nil {return _ebfgc ;};_eaab ._cgc ._afd =uint32 (_gcff );_eaab ._cgc ._cadb =uint32 (_gcff >>32);
};return nil ;};func (_deca *controlBase )readStreamDataM (_adad *_gd .Reader ,_cafg bool )error {_deca ._aae =&streamData {};if _cafg {_deca ._aae ._agab =&guidAndPicture {};if _beca :=_deca ._aae ._agab .importFromReader (_adad );_beca !=nil {return _beca ;
};};return nil ;};type morphDataDataBlock struct{_aea uint32 ;_gdg uint32 ;_bgeb uint32 ;_cgbg uint32 ;_deea byte ;_gfca byte ;_effd byte ;_aegd byte ;_ffe rune ;_cadg uint32 ;_gfcae uint16 ;_ece int16 ;_aad int16 ;_gfcd uint16 ;_bfac uint16 ;_baa uint8 ;
_ffdg uint8 ;_afdb uint8 ;_ebag uint8 ;_dge uint8 ;_dgdg uint32 ;_bbf bool ;_fgfc uint32 ;_cgad bool ;_bde uint32 ;_gfec uint32 ;_dfga uint32 ;_cfg uint16 ;_dcac uint16 ;_cbeb rune ;_adfca uint32 ;_add bool ;};func (_acdb *morphDataControl )export (_gab *_gd .Writer )error {if _bdce :=_acdb .writePropMask (_gab );
_bdce !=nil {return _bdce ;};if _gaf :=_acdb .writeDataBlock (_gab );_gaf !=nil {return _gaf ;};if _bcde :=_acdb .writeExtraDataBlock (_gab );_bcde !=nil {return _bcde ;};_acdb ._egde =uint16 (_gab .Len ()-4);if _fdae :=_acdb .writeStreamDataMP (_gab );
_fdae !=nil {return _fdae ;};return _acdb .writeTheRest (_gab );};func (_gbb *morphDataControl )readPropMask (_caag *_gd .Reader )error {var _bbee uint64 ;if _fef :=_a .Read (_caag ,_a .LittleEndian ,&_bbee );_fef !=nil {return _fef ;};_gbb ._cbef =&morphDataPropMask {};
_gbb ._cbef ._aag ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._febc ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._eggg ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._adef ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._eded ,_bbee =_gd .PopRightUI64 (_bbee );
_gbb ._cbef ._fea ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._ffce ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._cdf ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._agge ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._aceb ,_bbee =_gd .PopRightUI64 (_bbee );
_gbb ._cbef ._fbf ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._cfe ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._gebf ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._fdef ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._aabg ,_bbee =_gd .PopRightUI64 (_bbee );
_gbb ._cbef ._ddefb ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._cgde ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._babb ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._bea ,_bbee =_gd .PopRightUI64 (_bbee );_bbee >>=1;_gbb ._cbef ._dccbc ,_bbee =_gd .PopRightUI64 (_bbee );
_gbb ._cbef ._fgce ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._edce ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._cbad ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._bcbf ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._fbg ,_bbee =_gd .PopRightUI64 (_bbee );
_gbb ._cbef ._begac ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._adg ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._eaea ,_bbee =_gd .PopRightUI64 (_bbee );_gbb ._cbef ._ebac ,_bbee =_gd .PopRightUI64 (_bbee );_bbee >>=1;_bbee >>=1;_gbb ._cbef ._fgbf ,_bbee =_gd .PopRightUI64 (_bbee );
return nil ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetCaption sets a caption string for a commandButton control.
func (_ea *CommandButtonControl )SetCaption (caption string ){_ea ._fee ._acafb =true ;_ea ._fd ._aeg =uint32 (len (caption ));_ea ._bbgd ._egdb =caption ;};func (_fba *CommandButtonControl )writePropMask (_cce *_gd .Writer )error {_dffg :=uint32 (0);_dffg =_gd .PushLeftUI32 (_dffg ,_fba ._fee ._aef );
_dffg =_gd .PushLeftUI32 (_dffg ,_fba ._fee ._gdb );_dffg =_gd .PushLeftUI32 (_dffg ,_fba ._fee ._bg );_dffg =_gd .PushLeftUI32 (_dffg ,_fba ._fee ._acafb );_dffg =_gd .PushLeftUI32 (_dffg ,_fba ._fee ._afg );_dffg =_gd .PushLeftUI32 (_dffg ,_fba ._fee ._aec );
_dffg =_gd .PushLeftUI32 (_dffg ,_fba ._fee ._egdf );_dffg =_gd .PushLeftUI32 (_dffg ,_fba ._fee ._fge );_dffg =_gd .PushLeftUI32 (_dffg ,_fba ._fee ._aee );_dffg =_gd .PushLeftUI32 (_dffg ,_fba ._fee ._eed );_dffg =_gd .PushLeftUI32 (_dffg ,_fba ._fee ._ade );
_dffg >>=21;return _a .Write (_cce ,_a .LittleEndian ,_dffg );};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetWidth sets width of the SpinButton in HIMETRIC (0.01mm)
func (_cbg *SpinButtonControl )SetWidth (width uint32 ){_cbg ._degc ._gca =true ;_cbg ._ddge ._egbb =width ;};
2022-01-15 21:17:38 +00:00
2024-05-22 00:21:11 +00:00
// SetHeight sets height of the Label in HIMETRIC (0.01mm)
func (_fcba *LabelControl )SetHeight (height uint32 ){_fcba ._egdgc ._eeb =true ;_fcba ._cgc ._afd =height ;};type commandButtonPropMask struct{_aef bool ;_gdb bool ;_bg bool ;_acafb bool ;_afg bool ;_aec bool ;_egdf bool ;_fge bool ;_aee bool ;_eed bool ;
_ade bool ;};
2023-07-04 11:04:03 +00:00
2024-05-22 00:21:11 +00:00
// GetForeColor gets a button text color value for a system palette from a scrollBar control.
func (_acdg *ScrollBarControl )GetForeColor ()uint32 {return _acdg ._fff ._ggbc };
2022-12-06 11:56:49 +00:00
2024-05-22 00:21:11 +00:00
// TextBoxDataControl is a representation of a text box ActiveX form.
type TextBoxDataControl struct{*morphDataControlStringValue };
2022-12-06 11:56:49 +00:00
2024-05-22 00:21:11 +00:00
// GetMax gets a button max value.
func (_effdg *SpinButtonControl )GetMax ()int32 {return _effdg ._cabc ._ddgb };func (_caab *morphDataControl )readExtraDataBlock (_gfdb *_gd .Reader )error {_caab ._eabc =&morphDataExtraDataBlock {};if _caab ._cbef ._agge {var _fbga uint64 ;if _gfcc :=_gfdb .ReadPairProperty (&_fbga );
_gfcc !=nil {return _gfcc ;};_caab ._eabc ._acgc =uint32 (_fbga );_caab ._eabc ._eccd =uint32 (_fbga >>32);};if _caab ._adfg ._dgdg > 0{_fgceb ,_cgbf :=_gfdb .ReadStringProperty (_caab ._adfg ._dgdg );if _cgbf !=nil {return _cgbf ;};_caab ._eabc ._efe =_fgceb ;
};if _caab ._adfg ._fgfc > 0{_ccde ,_cfef :=_gfdb .ReadStringProperty (_caab ._adfg ._fgfc );if _cfef !=nil {return _cfef ;};_caab ._eabc ._dab =_ccde ;};if _caab ._adfg ._adfca > 0{_edbf ,_afdg :=_gfdb .ReadStringProperty (_caab ._adfg ._adfca );if _afdg !=nil {return _afdg ;
};_caab ._eabc ._fgaf =_edbf ;};return nil ;};func _agf (_ec uint32 )(bool ,uint32 ){if _ec ==0{return false ,0;};_eff :=_ec >=1<<31;if _eff {_ec -=1<<31;};return _eff ,_ec ;};
2023-06-10 07:12:37 +00:00
2024-05-22 00:21:11 +00:00
// SetWidth sets width of the CommandButton in HIMETRIC (0.01mm)
func (_cef *CommandButtonControl )SetWidth (width uint32 ){_cef ._fee ._aec =true ;_cef ._bbgd ._cde =width ;};func _fdee (_gedf *_gd .Reader )(*SpinButtonControl ,error ){_bgacg :=&SpinButtonControl {};if _fgca :=_bgacg .readPropMask (_gedf );_fgca !=nil {return nil ,_fgca ;
};if _gcfc :=_bgacg .readDataBlock (_gedf );_gcfc !=nil {return nil ,_gcfc ;};if _eaffg :=_bgacg .readExtraDataBlock (_gedf );_eaffg !=nil {return nil ,_eaffg ;};if _agaf :=_bgacg .readStreamDataM (_gedf ,_bgacg ._degc ._adbe );_agaf !=nil {return nil ,_agaf ;
};if _gbgdd :=_bgacg .readTheRest (_gedf );_gbgdd !=nil {return nil ,_gbgdd ;};return _bgacg ,nil ;};func (_ecee *ScrollBarControl )export (_eagg *_gd .Writer )error {if _geecb :=_ecee .writePropMask (_eagg );_geecb !=nil {return _geecb ;};if _bcgg :=_ecee .writeDataBlock (_eagg );
_bcgg !=nil {return _bcgg ;};if _efa :=_ecee .writeExtraDataBlock (_eagg );_efa !=nil {return _efa ;};_ecee ._egde =uint16 (_eagg .Len ()-4);if _baad :=_ecee .writeStreamDataM (_eagg );_baad !=nil {return _baad ;};return _ecee .writeTheRest (_eagg );};
type morphDataControlStringValue struct{*morphDataControl };
2023-06-10 07:12:37 +00:00
2024-05-22 00:21:11 +00:00
// LabelControl is a representation of a label ActiveX form.
type LabelControl struct{controlBase ;_egdgc *labelPropMask ;_dbf *labelDataBlock ;_cgc *labelExtraDataBlock ;_eagd *streamData ;};func (_ggbd *SpinButtonControl )writePropMask (_adac *_gd .Writer )error {_edbd :=uint32 (0);_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._cdffe );
_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._febd );_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._dbdd );_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._gca );_edbd >>=1;_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._bee );_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._fdd );
_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._cgbgf );_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._caf );_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._ffda );_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._ggce );_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._aaa );
_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._dbfa );_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._adbe );_edbd =_gd .PushLeftUI32 (_edbd ,_ggbd ._degc ._gbab );_edbd >>=17;return _a .Write (_adac ,_a .LittleEndian ,_edbd );};type controlBase struct{_egde uint16 ;
_efgd bool ;_aae *streamData ;_eaa []byte ;};
2023-06-10 07:12:37 +00:00
2024-05-22 00:21:11 +00:00
// GetHeight returns height of the morphDataControl in HIMETRIC (0.01mm)
func (_abfa *morphDataControl )GetHeight ()uint32 {return _abfa ._eabc ._acgc };
2024-05-08 13:54:39 +00:00
2024-05-22 00:21:11 +00:00
// SetBackColor sets a button text color value from a system palette for a scrollBar control.
func (_ebab *ScrollBarControl )SetBackColor (backColor uint32 ){_ebab ._abbf ._eee =true ;_ebab ._fff ._fcbb =backColor ;};