![]() | InDesign SDK 20.5 |
Public Member Functions | |
| SnpModifyLayoutGrid () | |
| virtual | ~SnpModifyLayoutGrid () |
| ErrorCode | ModifyLayoutGrid (UIDRef &targetPageOrWorkspace, const SnpModLayoutGridParameters ¶meters) |
| ErrorCode | ModifyLayoutGridPage (UIDRef &targetPage, const SnpModLayoutGridParameters ¶meters) |
| ErrorCode | ModifyLayoutGridWorkspace (UIDRef &targetWorkspace, const SnpModLayoutGridParameters ¶meters) |
| UIDRef | GetFirstSelectedPageOrGlobalWorkspace (IActiveContext *activeContext) |
| const ErrorCode | GetParameters (IDataBase *db, SnpModLayoutGridParameters ¶ms) |
Static Public Member Functions | |
| static PMReal | ConvertMillimetersToPoint (const PMReal &val) |
| static PMReal | ConvertQToPoint (const PMReal &val) |
| static PMReal | ConvertHaToPoint (const PMReal &val) |
| inline |
Constructor.
| inlinevirtual |
Destructor.
Convert Ha into point.
| val | Value in Ha to be converted. |
Convert millimeters into point.
| val | (in) Value in millimeters to be converted. |
Convert Q (kyu) into point.
| val | Value in Q to be converted. |
| UIDRef SnpModifyLayoutGrid::GetFirstSelectedPageOrGlobalWorkspace | ( | IActiveContext * | activeContext | ) |
Gets the first visible and selected page, or if there are no pages selected, returns the global workspace.
| activeContext | (in) The current active context. |
| const ErrorCode SnpModifyLayoutGrid::GetParameters | ( | IDataBase * | db, |
| SnpModLayoutGridParameters & | params | ||
| ) |
Gets arguments and puts the values into a parameter structure. Also set hardcoded default values for other parameters that are not specified as sniprun arguments. NOTE: You can experiment by changing some of the hardcoded parameters inside this method to see what happens!
| db | (in) The database to get the preferences from. |
| params | (out) The parsed and preset parameters. |
| ErrorCode SnpModifyLayoutGrid::ModifyLayoutGrid | ( | UIDRef & | targetPageOrWorkspace, |
| const SnpModLayoutGridParameters & | parameters | ||
| ) |
The main method that modifies a layout grid, either on a page or a global workspace. Note that layout grid data exists for both a page and a global workspace. Also, a page may be using a layout grid from a master page (and that master page may be based on another master page...)
| targetPageOrWorkspace | (in) UIDRef to a page or workspace. A page has IMasterPage, IColumns, IMargins. If a page is selected, the UIDRef will be that of a page (kPageBoss). A workspace has ICJKLayoutGridDefaults. If no document is open at the moment, the UIDRef should be that of a workspace (kWorkspaceBoss) |
| parameters | (in) A structure that contains all of the layout grid parameters to use. |
| ErrorCode SnpModifyLayoutGrid::ModifyLayoutGridPage | ( | UIDRef & | targetPage, |
| const SnpModLayoutGridParameters & | parameters | ||
| ) |
Modifies layout grid defaults on a page.
| targetPage | (in) As long as this is a valid page, the view is not required. |
| parameters | (in) A structure that contains all of the layout grid parameters to use. |
| ErrorCode SnpModifyLayoutGrid::ModifyLayoutGridWorkspace | ( | UIDRef & | targetWorkspace, |
| const SnpModLayoutGridParameters & | parameters | ||
| ) |
Modifies layout grid defaults on a workspace. Note that this method sets the defaults on the workspace. To restore original defaults, delete your "InDesign Defaults" file. This method is verified to work on the global workspace, although you could probably use this on the document workspace as well.
| targetWorkspace | (in) The workspace to target. |
| parameters | (in) A structure that contains all of the layout grid parameters to use. |