Browse Source

Added new Constraints property to the TForm support class.

Martijn Laan 6 years ago
parent
commit
04f6f197bf

+ 1 - 1
Components/UniPs

@@ -1 +1 @@
-Subproject commit c2ee410b06fc967890bab40a8add60d3d686764a
+Subproject commit 7b33a99b24c5753397779f568d50f83c44bcb048

BIN
ISHelp/ISHelpGen/ISHelpGen.exe


+ 2 - 2
ISHelp/ISHelpGen/UIsxclassesParser.pas

@@ -118,11 +118,11 @@ procedure TIsxclassesParser.SaveXML(const HeaderFileName, HeaderFileName2, Foote
           Result := Text^;
           Inc(Text);
         end;
-      'A'..'Z', 'a'..'z', '_':
+      '0'..'9', 'A'..'Z', 'a'..'z', '_', '.':
         begin
           P := Text;
           Inc(Text);
-          while CharInSet(Text^ , ['0'..'9', 'A'..'Z', 'a'..'z', '_']) do
+          while CharInSet(Text^ , ['0'..'9', 'A'..'Z', 'a'..'z', '_', '.']) do
             Inc(Text);
           SetString(Result, P, Text - P);
         end;

+ 11 - 1
ISHelp/isxclasses.pas

@@ -221,6 +221,15 @@ TBorderIcon = (biSystemMenu, biMinimize, biMaximize, biHelp);
 
 TBorderIcons = set of TBorderIcon;
 
+TConstraintSize = 0..MaxInt;
+
+TSizeConstraints = class(TPersistent);
+  property MaxHeight: TConstraintSize; read write;
+  property MaxWidth: TConstraintSize; read write;
+  property MinHeight: TConstraintSize; read write;
+  property MinWidth: TConstraintSize; read write;
+end;
+
 TPosition = (poDesigned, poDefault, poDefaultPosOnly, poDefaultSizeOnly, poScreenCenter, poDesktopCenter, poMainFormCenter, poOwnerFormCenter);
 
 TCloseAction = (caNone, caHide, caFree, caMinimize);
@@ -247,11 +256,12 @@ TForm = class(TScrollingWinControl)
   property Active: Boolean; read;
   property ActiveControl: TWinControl; read write;
   property Anchors: TAnchors; read write;
+  property AutoScroll: Boolean; read write;
   property BorderIcons: TBorderIcons; read write;
   property BorderStyle: TFormBorderStyle; read write;
   property Caption: String; read write;
-  property AutoScroll: Boolean; read write;
   property Color: TColor; read write;
+  property Constraints: TSizeConstraints; read write;
   property Font: TFont; read write;
   property FormStyle: TFormStyle; read write;
   property KeyPreview: Boolean; read write;

+ 1 - 0
Projects/ScriptClasses_C.pas

@@ -583,6 +583,7 @@ begin
   { Controls }
   SIRegister_Controls_TypesAndConsts(Cl);
   SIRegisterTDragObject(Cl);
+  SIRegisterTSizeConstraints(Cl);
   SIRegisterTControl(Cl);
   RegisterWinControl_C(Cl);
   SIRegisterTGraphicControl(Cl);

+ 1 - 0
Projects/ScriptClasses_R.pas

@@ -356,6 +356,7 @@ begin
     RIRegisterTGraphicControl(Cl);
     RIRegisterTCustomControl(Cl);
     RIRegister_TDragObject(Cl);
+    RIRegisterTSizeConstraints(cl);
 
     { Forms }
     RIRegisterTScrollingWinControl(Cl);

+ 6 - 1
whatsnew.htm

@@ -75,7 +75,12 @@ For conditions of distribution and use, see <a href="http://www.jrsoftware.org/f
 <ul>
   <li>Added new [Setup] section directive: <tt>WizardResizable</tt>. If this directive is set to <tt>yes</tt>, the user will be able to resize the main Setup wizard window.</li>
   <li>Added new [Setup] section directive: <tt>WizardSizePercent</tt>, which can be used to increase the default size of all Setup and Uninstall wizard windows without increasing the font size.</li>
-  <li>Pascal Scripting change: Added new <tt>Anchors</tt> property to all controls and new <tt>KeepSizeY</tt> property to <tt>TSetupForm</tt> which allows you to add full support for <tt>WizardResizable</tt> and <tt>WizardSizePercent</tt> to all your custom controls, custom wizard pages and <tt>TSetupForm</tt> forms if you have any. See the <i>CodeClasses.iss</i> example script for an example. This example also shows other changes done to <tt>TSetupForm</tt>.</li>
+  <li>Pascal Scripting changes:
+  <ul>
+    <li>Added new <tt>Anchors</tt> property to all controls and new <tt>KeepSizeY</tt> property to <tt>TSetupForm</tt> which allows you to add full support for <tt>WizardResizable</tt> and <tt>WizardSizePercent</tt> to all your custom controls, custom wizard pages and <tt>TSetupForm</tt> forms if you have any. See the <i>CodeClasses.iss</i> example script for an example. This example also shows other changes done to <tt>TSetupForm</tt>.</li>
+    <li>Added new <tt>Constraints</tt> property to the <tt>TForm</tt> support class.</li>
+  </ul>
+  </li>
 </ul>
 <p><span class="head2">New modern wizard style</span></p>
 <p>The wizard window now supports a more modern look:</p>