//------------------------------------------------------------------- // GetFloaterProperties //------------------------------------------------------------------- internal override void GetFloaterProperties( uint fswdirTrack, // IN: direction of track out PTS.FSFLOATERPROPS fsfloaterprops) // OUT: properties of the floater { fsfloaterprops = new PTS.FSFLOATERPROPS(); fsfloaterprops.fFloat = PTS.True; // Floater fsfloaterprops.fskclear = PTS.WrapDirectionToFskclear((WrapDirection)Element.GetValue(Block.ClearFloatersProperty)); // Get floater alignment from HorizontalAlignment of the floater element. switch (HorizontalAlignment) { case HorizontalAlignment.Right: fsfloaterprops.fskfloatalignment = PTS.FSKFLOATALIGNMENT.fskfloatalignMax; break; case HorizontalAlignment.Center: fsfloaterprops.fskfloatalignment = PTS.FSKFLOATALIGNMENT.fskfloatalignCenter; break; case HorizontalAlignment.Left: default: fsfloaterprops.fskfloatalignment = PTS.FSKFLOATALIGNMENT.fskfloatalignMin; break; } fsfloaterprops.fskwr = PTS.WrapDirectionToFskwrap(WrapDirection); // Always delay floaters if there is no progress. fsfloaterprops.fDelayNoProgress = PTS.True; }
internal int GetFloaterProperties( IntPtr pfsclient, // IN: client opaque data IntPtr nmFloater, // IN: name of the floater uint fswdirTrack, // IN: direction of Track out PTS.FSFLOATERPROPS fsfloaterprops)// OUT: properties of the floater { int fserr = PTS.fserrNone; try { FloaterBaseParagraph para = PtsContext.HandleToObject(nmFloater) as FloaterBaseParagraph; PTS.ValidateHandle(para); para.GetFloaterProperties(fswdirTrack, out fsfloaterprops); } catch (Exception e) { fsfloaterprops = new PTS.FSFLOATERPROPS(); PtsContext.CallbackException = e; fserr = PTS.fserrCallbackException; } catch { fsfloaterprops = new PTS.FSFLOATERPROPS(); PtsContext.CallbackException = new System.Exception("Caught a non CLS Exception"); fserr = PTS.fserrCallbackException; } return fserr; }
//------------------------------------------------------------------- // GetFloaterProperties //------------------------------------------------------------------- internal override void GetFloaterProperties( uint fswdirTrack, // IN: direction of track out PTS.FSFLOATERPROPS fsfloaterprops) // OUT: properties of the floater { fsfloaterprops = new PTS.FSFLOATERPROPS(); fsfloaterprops.fFloat = PTS.False; // Floater fsfloaterprops.fskclear = PTS.WrapDirectionToFskclear((WrapDirection)Element.GetValue(Block.ClearFloatersProperty)); // Set alignment to left alignment. Do not allow text wrap on any side fsfloaterprops.fskfloatalignment = PTS.FSKFLOATALIGNMENT.fskfloatalignMin; fsfloaterprops.fskwr = PTS.FSKWRAP.fskwrNone; // Always delay UIElement if there is no progress fsfloaterprops.fDelayNoProgress = PTS.True; }