#include <sgfonts.h>
Inheritance diagram for FontsSGallery:
Public Member Functions | |
FontsSGallery () | |
~FontsSGallery () | |
virtual BOOL | IsLibraryGalleryWithNonLibraryGroups (void) |
To check if we're a dedicated library gallery, or a half+half (like the font gallery). | |
virtual MsgResult | Message (Msg *Message) |
Standard library gallery message handler. | |
BOOL | InstallFonts (BOOL Copy) |
BOOL | DeinstallFonts (BOOL Delete) |
BOOL | InstallFont (PathName *FontFile, String_256 *Description, BOOL Temp) |
BOOL | DeinstallFont (String_256 *FontDesc, BOOL Delete, LOGFONT *LogFnt=NULL) |
BOOL | InstallTTFFont (PathName *FontFile, String_256 *Description, BOOL Temp) |
BOOL | DeinstallTTFFont (String_256 *FontDesc, BOOL Delete) |
virtual BOOL | CanCreateIndexes (void) |
To determine if this gallery can generate indexes or not If you want to create indexes, override and return TRUE. | |
virtual BOOL | GetDefaults (String_256 *DefaultIndex, String_256 *IndexDesc, SGLibType *Type) |
To determine various library gallery default properties. | |
virtual BOOL | GetLibraryDirectoryName (String_256 *LibDirName) |
Get the default CD directory name for the gallery. | |
virtual BOOL | CheckForIndexMatch (StringBase *Txt) |
To see whether we should add this line of the index.txt file to this gallery. | |
virtual void | WorkOutSectionName (String_256 *Section) |
Works out which library gallery we are and returns a section name as appropriate. | |
virtual BOOL | GetQuietStatus (void) |
Get the Quiet status of the gallery. | |
virtual void | SetQuietStatus (BOOL Status) |
Set the Quiet status of the gallery. | |
virtual BOOL | ScanForLocation (SGLibType Type, StringBase *Result) |
Searches all the drives for a CDROM drive. If it finds the Camelot CD mount here at Xara HQ, we point to that instead. Notes:. | |
virtual SGLibType | GetGalleryType () |
virtual String_256 * | GetDefaultLibraryPath () |
void | SelectionHasChanged (void) |
To inform the gallery that the selection has changed in some way. This function handles the default library gallery buttons. | |
virtual BOOL | InitMenuCommands (void) |
Initialises any menu commands that this gallery needs. | |
virtual BOOL | BuildCommandMenu (GalleryContextMenu *TheMenu, SGMenuID MenuID) |
To build a menu of commands to be popped up over the gallery. | |
virtual OpState | GetCommandState (StringBase *CommandID, String_256 *ShadeReason) |
To determine the state of a given menu item. This method is an exact parallel to an Op's GetState method (in fact, it is called by an Op's GetState). | |
virtual void | DoCommand (StringBase *CommandID) |
To apply a given command when it is chosen from the menu. | |
Static Public Member Functions | |
static BOOL | GetWindowsFontDirectory (String_256 *Result) |
static UINT32 CALLBACK | FileHook (HWND hDlg, UINT32 iMsg, UINT32 wParam, INT32 lParam) |
static INT32 | GetDragFontOffset (KernelBitmap *Bmp) |
static BOOL | ApplyFont (BOOL Dropping, SGDisplayNode *TheNode, NodeRenderableInk *pObjectHit=NULL) |
static BOOL | InstallDraggedLibFont (FontsSGallery *TheGallery, SGLibDisplayItem *FontItem, String_64 *Desc) |
static BOOL | IsFontAlreadyInstalled (String_256 *FontDesc, FontClass Class=FC_UNDEFINED) |
static BOOL | FindLogFont (String_256 *FontDesc, LOGFONT **lplplf, FontClass Class=FC_UNDEFINED) |
static void | DoFontChange (void) |
static void | MakeBoldItalicReadable (String_256 *Desc) |
Public Attributes | |
SGThumbs * | InsCache |
Static Public Attributes | |
static SGFontsGroup * | InsGroup |
static FontsSGallery * | ThisGallery |
static String_256 | DefaultLibraryPath |
static BOOL | DontUpdate |
static INT32 | DefaultDisplayMode |
static UINT32 | DefaultSortKeys |
static BOOL | DeleteTTFandFOTfiles |
static String_256 | LargeDisplayString |
static BOOL | QuietStatus |
static BOOL | WarnAboutSectionDragging |
static BOOL | WarnAboutMultipleATMDragging |
Protected Member Functions | |
virtual BOOL | PreCreate (void) |
The LibraryGallery PreCreate handler. This overrides the base class PreCreate function. It is called at the very beginning of the SuperGallery::Create method, before the window has been created. | |
virtual BOOL | ApplyAction (SGActionType Action) |
Applies certain conventional gallery actions (usually associated with gallery buttons, for new, edit, delete, etc). | |
virtual SGDisplayItem * | AddLibraryItem (SGDisplayGroup *LibraryGroup, Library *ParentLib, LibraryIndex ItemIndex, BOOL bNew=FALSE) |
Called by the Library class to create a display item for every item in a newly-scanned library file. It is essentially a callback to the gallery which requested that the library be scanned. | |
BOOL | GetFOTNameFromRegistry (String_256 *Desc, PathName *FOTFile) |
BOOL | SetFOTNameInRegistry (String_256 *Desc, PathName *FOTFile) |
BOOL | GetFontsKey (String_256 *Key) |
void | HandleDragStart (DragMessage *DragMsg) |
Checks a DragMessage to see if it is a colour drag. If it is, then it creates a drag target for this gallerys listbox. | |
virtual SGDisplayGroup * | AddLibraryGroup (Library *LibraryToDisplay, INT32 NumItems) |
Create a library group, as opposed to a display group. | |
SGDisplayItem * | CopyDisplayItem (SGDisplayItem *SourceItem, SGDisplayGroup *DestGroup, SGDisplayItem *TargetPosition) |
"Copies" the existing node in the tree in an appropriate fashion. | |
virtual void | AllItemsCopied (SGDisplayGroup *DestGroup) |
This upcall method is called after one or more items have been copied or moved by a gallery drag. It allows the gallery to do update things like broadcasting a message or getting a related window (eg colour line) to redraw at the end of a move/copy operation. This allows thousands of items to be moved/copied with only a single redraw/message-broadcast, etc at the very end. | |
virtual void | ApplySortNow (BOOL ApplyToEntireList) |
Applies the current gallery sort mode (member array SortKeys) to the display list. | |
void | CreateNewSubtreeForInstalledFonts (SGFontsGroup *ExistingGroup=NULL) |
BOOL | CreateNewSubtreeForLibraryFonts (PathName *LibPath, BOOL WipeOld=TRUE) |
void | SortGallery (void) |
Sort the entire gallery alphabetically. | |
BOOL | BrowseClicked (void) |
Handle clicks on the browse button. | |
Static Protected Member Functions | |
static BOOL | UseWin95FontInstallMethod () |
Protected Attributes | |
UINT32 | IDCount |
Static Protected Attributes | |
static BOOL | AddedFonts |
static FontClass | EnumFontClass |
Private Member Functions | |
void | DoShadeGallery (BOOL ShadeIt) |
Handles the standard library gallery button shading in the gallery Notes:. | |
BOOL | InstalledFontsSelected (void) |
INT32 | LibraryFontsSelected (void) |
virtual BOOL | CanSearchKeywords (void) |
Used to determine if this type of gallery supports keyword searching. At the moment, all except the fonts gallery do. | |
void | SortInstalledFonts (void) |
Static Private Member Functions | |
static INT32 CALLBACK | EnumInstalledFamily (ENUMLOGFONT FAR *lpelf, NEWTEXTMETRIC FAR *lpntm, INT32 FontType, LPARAM handle) |
static INT32 CALLBACK | EnumInstalledFonts (ENUMLOGFONT FAR *lpelf, NEWTEXTMETRIC FAR *lpntm, INT32 FontType, LPARAM handle) |
Definition at line 353 of file sgfonts.h.
|
|
|
|
|
Create a library group, as opposed to a display group.
Reimplemented from LibraryGallery. |
|
Called by the Library class to create a display item for every item in a newly-scanned library file. It is essentially a callback to the gallery which requested that the library be scanned.
Reimplemented from LibraryGallery. |
|
This upcall method is called after one or more items have been copied or moved by a gallery drag. It allows the gallery to do update things like broadcasting a message or getting a related window (eg colour line) to redraw at the end of a move/copy operation. This allows thousands of items to be moved/copied with only a single redraw/message-broadcast, etc at the very end.
Notes: The caller automatically causes the appropriate things to be redrawn, so we just need to update other things. e.g. The colour gallery broadcasts a ColourChangingMsg to make sure that the colour line and other interested parties all update appropriately.
Reimplemented from LibraryGallery. |
|
Applies certain conventional gallery actions (usually associated with gallery buttons, for new, edit, delete, etc).
Reimplemented from LibraryGallery. |
|
|
|
Applies the current gallery sort mode (member array SortKeys) to the display list.
Reimplemented from SuperGallery. |
|
Handle clicks on the browse button.
Reimplemented from LibraryGallery. |
|
To build a menu of commands to be popped up over the gallery.
Reimplemented from SuperGallery. |
|
To determine if this gallery can generate indexes or not If you want to create indexes, override and return TRUE.
Reimplemented from LibraryGallery. |
|
Used to determine if this type of gallery supports keyword searching. At the moment, all except the fonts gallery do.
Reimplemented from LibraryGallery. |
|
To see whether we should add this line of the index.txt file to this gallery.
Reimplemented from LibraryGallery. |
|
"Copies" the existing node in the tree in an appropriate fashion.
TargetPosition - NULL (to add the copied item to the end of the sibling list), or points to an item BEFORE which the copied item will be inserted.
Notes: This method should be overridden by derived galleries to provide appropriate behaviour (some galleries (e.g colour) will copy the real-item that the given display-item references to the new group (document), while other galleries (layer) may just move the item after all). Note the handy InsertCopiedItem and MoveBefore/After methods which are available to take all of the hard work out of copying/moving items! See the body of this method in the source code for example pseudocode. For real code, see the Colour Gallery (sgcolour.cpp)
Reimplemented from LibraryGallery. |
|
|
|
|
|
|
|
|
|
|
|
To apply a given command when it is chosen from the menu.
Default handling is provided for the following commands. These commands need only be added to your menu in BuildCommandMenu in order to become available. Override the default behaviour if it is unsuitable. MonoOn Properties* Shows properties (options) dialogue Sort* Shows Sort dialogue Find* Shows find dialogue New Calls ApplyAction(SGACTION_CREATE) Apply Calls ApplyAction(SGACTION_APPLY) Edit Calls ApplyAction(SGACTION_EDIT) Delete Calls ApplyAction(SGACTION_DELETE) Redefine Calls ApplyAction(SGACTION_REDEFINE) NextGroup Scrolls to show next group PrevGroup Scrolls to show previous group FoldGroup Forces the selected group folded UnfoldGroup Forces the seletced group unfolded MonoOff These items should always be provided if you provide an options menu. They should be shaded when unavailable. Reimplemented from SuperGallery. |
|
|
|
Handles the standard library gallery button shading in the gallery Notes:.
Reimplemented from LibraryGallery. |
|
|
|
|
|
|
|
|
|
To determine the state of a given menu item. This method is an exact parallel to an Op's GetState method (in fact, it is called by an Op's GetState).
Default handling is provided for the following commands. These commands need only be added to your menu in BuildCommandMenu in order to become available. Override the default behaviour if it is unsuitable: MonoOn Properties } Sort } - Always available Find } New Always available Apply Available if one item selected Edit Available if one item selected Delete Available if one or more items salected Redefine Available if one item selected NextGroup Available if there is a next group PrevGroup Available if there is a previous group FoldGroup Always available if there is a selected group UnfoldGroup Always available if there is a selected group MonoOff Reimplemented from SuperGallery. |
|
Reimplemented from LibraryGallery. Definition at line 418 of file sgfonts.h. 00418 {return &DefaultLibraryPath;}
|
|
To determine various library gallery default properties.
Reimplemented from LibraryGallery. |
|
|
|
|
|
|
|
Reimplemented from LibraryGallery. Definition at line 416 of file sgfonts.h.
|
|
Get the default CD directory name for the gallery.
Reimplemented from LibraryGallery. |
|
Get the Quiet status of the gallery.
Reimplemented from LibraryGallery. |
|
|
|
Checks a DragMessage to see if it is a colour drag. If it is, then it creates a drag target for this gallerys listbox.
Reimplemented from LibraryGallery. |
|
Initialises any menu commands that this gallery needs.
Note: Should only create the menu commands once - further calls in the future should return TRUE immediately without trying to re-init the ops.
Reimplemented from SuperGallery. |
|
|
|
|
|
|
|
|
|
|
|
|
|
To check if we're a dedicated library gallery, or a half+half (like the font gallery).
Reimplemented from LibraryGallery. Definition at line 362 of file sgfonts.h. 00362 {return FALSE;};
|
|
|
|
|
|
Standard library gallery message handler.
NOTE WELL that the SuperGallery base class handler does some funky things for us - see SuperGallery::Message - such as deleting our display subtree for any document which dies (which, uncannily, would explain why they go away like that when you close documents ;-), and shading the gallery when there are no documents present. [To override this behaviour in these cases, you should respond to the message, and return OK rather than calling the base class message handler]
Reimplemented from LibraryGallery. |
|
The LibraryGallery PreCreate handler. This overrides the base class PreCreate function. It is called at the very beginning of the SuperGallery::Create method, before the window has been created.
Reimplemented from LibraryGallery. |
|
Searches all the drives for a CDROM drive. If it finds the Camelot CD mount here at Xara HQ, we point to that instead. Notes:.
Reimplemented from LibraryGallery. |
|
To inform the gallery that the selection has changed in some way. This function handles the default library gallery buttons.
Reimplemented from LibraryGallery. |
|
|
|
Set the Quiet status of the gallery.
Reimplemented from LibraryGallery. |
|
Sort the entire gallery alphabetically.
Reimplemented from LibraryGallery. |
|
|
|
|
|
Works out which library gallery we are and returns a section name as appropriate.
Reimplemented from LibraryGallery. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|