#include <ax_resource/ax_resource_library.h>
Public Member Functions | |
| AxResourceLibrary () | |
| AxResourceLibrary (const AxResourceLibrary &library) | |
| ~AxResourceLibrary () | |
| void | Init () |
| void | operator= (const AxResourceLibrary &library) |
| void | Copy (const AxResourceLibrary &library) |
| virtual bool | Initialize () |
| Initialize modules etc. | |
| virtual bool | Uninitialize () |
| Uninitialize modules etc. | |
| virtual void | CreateFullWorkingSet () |
| Create a working set from the currently loaded books. | |
| virtual void | CreateFullWorkingSet (AxResourceSet &workingSet) |
| virtual void | CreateWorkingSetFromSearch (const wxString &field, const wxString &value, int flags=axSEARCH_EXACT_MATCH) |
| Create a working set from a specification. | |
| virtual void | CreateWorkingSetFromSearch (AxResourceSet &workingSet, const wxString &field, const wxString &value, int flags=axSEARCH_EXACT_MATCH) |
| virtual void | ApplySearchToWorkingSet (const wxString &field, const wxString &value, int flags) |
| Apply search to current working set. | |
| virtual void | ApplySearchToWorkingSet (AxResourceSet &workingSet, const wxString &field, const wxString &value, int flags) |
| virtual bool | Match (AxResource &resource, const wxString &field, const wxString &value, int flags) |
| Match? | |
| virtual bool | RefreshAll () |
| Refresh the display using current settings TODO reflect current settings! | |
| virtual bool | LoadFromFolder (const wxString &folder, bool clearFirst=true, bool checkIfFileLoaded=false) |
| Load books from a folder. | |
| virtual bool | LoadFromFolder (AxResourceInfoArray &books, const wxString &folder, bool clearFirst=true, bool checkIfFileLoaded=false, bool allocId=true) |
| virtual bool | LoadFromFolders (const wxArrayString &folders, bool clearFirst=true, bool checkIfFileLoaded=false) |
| Load books from a set of folders. | |
| virtual bool | RefreshLibrary (bool clearAll, bool interactive, wxWindow *parent=NULL) |
| Refresh the library. | |
| virtual bool | LoadLibrary () |
| Load the library. | |
| virtual bool | SaveLibrary (bool forceConsolidatedWrite=false) |
| Save the library. | |
| virtual AxResource * | CreateResourceFromFile (const wxString &filename) |
| Load resource from file. | |
| bool | AggregateFiles (AxResourceInfoArray &books, wxArrayString &files, bool checkIfFileLoaded, bool allocId) |
| Aggregate any files that belong together and add to books. | |
| bool | LoadImageFromCoverDesign (AxResourceInfo &info, const wxSize &thumbnailImageSize) |
| Load image from cover book or default design. | |
| int | AddResource (AxResource *resource) |
| Add resource. | |
| int | AddResource (AxResourceInfo &info, bool isNew) |
| Add resource. | |
| bool | RemoveSelectedBooks (bool interactive=true, wxWindow *win=NULL) |
| Remove resources from library. | |
| bool | RemoveResource (int sel, bool interactive=true, wxWindow *win=NULL) |
| Remove resource from library. | |
| bool | PurgeDeletedFiles () |
| Purge files that no longer exist. | |
| bool | RecursivelyFindFiles (const wxString &folder, AxFolders &folders) |
| Recursively find all supported files. | |
| bool | LoadEpubBookInfo (const wxString &filename, AxResourceInfo &info, bool makeThumbnail, const wxSize &thumbnailImageSize, bool &foundCoverImage) |
| Load information from epub file. | |
| bool | IsFileSupported (const wxString &filename) const |
| Is this file supported? | |
| bool | IsFileInIndex (const wxString &filename) const |
| Is this file in the index? | |
| bool | IsFileInIndex (const AxResourceInfoArray &books, const wxString &filename) const |
| int | FindByFile (const wxString &filename) const |
| Find by file. | |
| int | FindByFile (const AxResourceInfoArray &books, const wxString &filename) const |
| AxResourceInfo * | FindByRecordIdentifier (long id) const |
| Find by unique record identifier. | |
| wxString | CreateHtmlSummary (AxResourceInfo &info, const wxColour &backgroundColour, const wxColour &textColour) |
| Write HTML summary for this book. | |
| wxString | CreateHtmlBlankSummary (const wxColour &backgroundColour, const wxColour &textColour) |
| Write HTML blank page. | |
| int | CompareItems (AxResource &item1, AxResource &item2, int col) |
| Compare two items for sorting purposes. | |
| int | CompareItemsHelper (AxResource &item1, AxResource &item2, int col) |
| virtual void | Sort (int col) |
| Sort the working set. | |
| void | UpdateSelectedBookInfo (int idx, bool forceClear=false) |
| Update main panel according to current document. | |
| virtual bool | Read (wxInputStream &stream, wxDataInputStream &dataStream, int flags=0) |
| virtual bool | Write (wxOutputStream &stream, wxDataOutputStream &dataStream, int flags=0) |
| virtual bool | Read (const wxString &filename, int flags=0) |
| virtual bool | Write (const wxString &filename, int flags=0) |
| virtual bool | CanWriteChangesSeparately (int percentageThreshold=20) |
| Decide whether we can save modifications seperately, or whether we should write out the whole file and delete the modifications file. | |
| virtual void | Clear () |
| Clear all. | |
| long | GetLastIdentifier () const |
| Get/set last (highest) identifier. | |
| void | SetLastIdentifier (long id) |
| long | AllocateNewIdentifier () |
| Allocate new identifier. | |
| const AxResourceInfoArray & | GetBooks () const |
| Get books. | |
| AxResourceInfoArray & | GetBooks () |
| bool | GetModified () const |
| Get/set modified flag. | |
| void | SetModified (bool mod) |
| wxArrayString & | GetCurrentAuthors () |
| Get the current keyword arrays. | |
| wxArrayString & | GetCurrentPublishers () |
| wxArrayString & | GetCurrentSubjects () |
| wxArrayString & | GetCurrentFormats () |
| void | AddToCurrentAuthors (const wxString &author) |
| Add to current keyword arrays. | |
| void | AddToCurrentPublishers (const wxString &publisher) |
| void | AddToCurrentSubjects (const wxString &subject) |
| void | AddToCurrentFormats (const wxString &format) |
| void | AddCurrentInfo (const AxResourceInfo &info) |
| Add to current author etc. arrays. | |
| int | GetSelection () const |
| Get selected item (index into the array of books). | |
| AxResourceInfo * | GetSelectedBook () const |
| Get selected item (index into the array of books). | |
| void | SetSelection (int sel, bool select=true) |
| Set selection. | |
| void | SetSingleSelection (int sel) |
| Set single selection, clearing others. | |
| void | ClearSelections () |
| Clear selections. | |
| bool | GetSelections (wxArrayInt &selections) |
| Get all selections. | |
| void | DisableProcessing (bool disable) |
| bool | IsProcessingDisabled () const |
| bool | DoSearch (const wxString &searchText) |
| Perform a search. | |
| const wxSize & | GetSummaryCoverSize () const |
| Get the default cover design. | |
| const wxSize & | GetThumbnailCoverSize () const |
| void | SetSummaryCoverSize (const wxSize &sz) |
| void | SetThumbnailCoverSize (const wxSize &sz) |
| int | GetSortByCol () const |
| Instantiate the keyword provider. | |
| void | SetSortByCol (int col) |
| bool | UploadFiles (wxWindow *parent) |
| Get the root of the sites branch. | |
| bool | CanUploadFiles () const |
| Can upload files? | |
| void | SetSettings (const AxResourceLibrarySettings &settings) |
| Set settings. | |
| AxResourceLibrarySettings & | GetSettings () |
| Get settings. | |
| const AxResourceLibrarySettings & | GetSettings () const |
| void | SetCommandManager (wxEditorCommandManager *manager) |
| Set//get the optional command manager object that can be used to launch viewers. | |
| wxEditorCommandManager * | GetCommandManager () const |
Static Public Member Functions | |
| static AxResourceLibrary * | GetResourceLibrary () |
| Gets the (one) instance of the manager. | |
| AxResourceLibrary::AxResourceLibrary | ( | ) | [inline] |
| AxResourceLibrary::AxResourceLibrary | ( | const AxResourceLibrary & | library | ) | [inline] |
| AxResourceLibrary::~AxResourceLibrary | ( | ) |
| void AxResourceLibrary::AddCurrentInfo | ( | const AxResourceInfo & | info | ) |
Add to current author etc. arrays.
| int AxResourceLibrary::AddResource | ( | AxResourceInfo & | info, | |
| bool | isNew | |||
| ) |
Add resource.
| int AxResourceLibrary::AddResource | ( | AxResource * | resource | ) |
Add resource.
| void AxResourceLibrary::AddToCurrentAuthors | ( | const wxString & | author | ) |
Add to current keyword arrays.
| void AxResourceLibrary::AddToCurrentFormats | ( | const wxString & | format | ) |
| void AxResourceLibrary::AddToCurrentPublishers | ( | const wxString & | publisher | ) |
| void AxResourceLibrary::AddToCurrentSubjects | ( | const wxString & | subject | ) |
| bool AxResourceLibrary::AggregateFiles | ( | AxResourceInfoArray & | books, | |
| wxArrayString & | files, | |||
| bool | checkIfFileLoaded, | |||
| bool | allocId | |||
| ) |
Aggregate any files that belong together and add to books.
| long AxResourceLibrary::AllocateNewIdentifier | ( | ) |
Allocate new identifier.
| void AxResourceLibrary::ApplySearchToWorkingSet | ( | AxResourceSet & | workingSet, | |
| const wxString & | field, | |||
| const wxString & | value, | |||
| int | flags | |||
| ) | [virtual] |
| void AxResourceLibrary::ApplySearchToWorkingSet | ( | const wxString & | field, | |
| const wxString & | value, | |||
| int | flags | |||
| ) | [virtual] |
Apply search to current working set.
| bool AxResourceLibrary::CanUploadFiles | ( | ) | const |
Can upload files?
| bool AxResourceLibrary::CanWriteChangesSeparately | ( | int | percentageThreshold = 20 |
) | [virtual] |
Decide whether we can save modifications seperately, or whether we should write out the whole file and delete the modifications file.
| void AxResourceLibrary::Clear | ( | ) | [virtual] |
Clear all.
| void AxResourceLibrary::ClearSelections | ( | ) |
Clear selections.
| int AxResourceLibrary::CompareItems | ( | AxResource & | item1, | |
| AxResource & | item2, | |||
| int | col | |||
| ) |
Compare two items for sorting purposes.
| int AxResourceLibrary::CompareItemsHelper | ( | AxResource & | item1, | |
| AxResource & | item2, | |||
| int | col | |||
| ) |
| void AxResourceLibrary::Copy | ( | const AxResourceLibrary & | library | ) |
| void AxResourceLibrary::CreateFullWorkingSet | ( | AxResourceSet & | workingSet | ) | [virtual] |
| void AxResourceLibrary::CreateFullWorkingSet | ( | ) | [virtual] |
Create a working set from the currently loaded books.
| wxString AxResourceLibrary::CreateHtmlBlankSummary | ( | const wxColour & | backgroundColour, | |
| const wxColour & | textColour | |||
| ) |
Write HTML blank page.
| wxString AxResourceLibrary::CreateHtmlSummary | ( | AxResourceInfo & | info, | |
| const wxColour & | backgroundColour, | |||
| const wxColour & | textColour | |||
| ) |
Write HTML summary for this book.
| AxResource * AxResourceLibrary::CreateResourceFromFile | ( | const wxString & | filename | ) | [virtual] |
Load resource from file.
| void AxResourceLibrary::CreateWorkingSetFromSearch | ( | AxResourceSet & | workingSet, | |
| const wxString & | field, | |||
| const wxString & | value, | |||
| int | flags = axSEARCH_EXACT_MATCH | |||
| ) | [virtual] |
| void AxResourceLibrary::CreateWorkingSetFromSearch | ( | const wxString & | field, | |
| const wxString & | value, | |||
| int | flags = axSEARCH_EXACT_MATCH | |||
| ) | [virtual] |
Create a working set from a specification.
If field is empty, allow any field to match
| void AxResourceLibrary::DisableProcessing | ( | bool | disable | ) | [inline] |
| bool AxResourceLibrary::DoSearch | ( | const wxString & | searchText | ) |
Perform a search.
| int AxResourceLibrary::FindByFile | ( | const AxResourceInfoArray & | books, | |
| const wxString & | filename | |||
| ) | const |
| int AxResourceLibrary::FindByFile | ( | const wxString & | filename | ) | const |
Find by file.
| AxResourceInfo * AxResourceLibrary::FindByRecordIdentifier | ( | long | id | ) | const |
Find by unique record identifier.
| AxResourceInfoArray& AxResourceLibrary::GetBooks | ( | ) | [inline] |
| const AxResourceInfoArray& AxResourceLibrary::GetBooks | ( | ) | const [inline] |
Get books.
| wxEditorCommandManager* AxResourceLibrary::GetCommandManager | ( | ) | const [inline] |
| wxArrayString& AxResourceLibrary::GetCurrentAuthors | ( | ) | [inline] |
Get the current keyword arrays.
| wxArrayString& AxResourceLibrary::GetCurrentFormats | ( | ) | [inline] |
| wxArrayString& AxResourceLibrary::GetCurrentPublishers | ( | ) | [inline] |
| wxArrayString& AxResourceLibrary::GetCurrentSubjects | ( | ) | [inline] |
| long AxResourceLibrary::GetLastIdentifier | ( | ) | const [inline] |
Get/set last (highest) identifier.
| bool AxResourceLibrary::GetModified | ( | ) | const [inline] |
Get/set modified flag.
| static AxResourceLibrary* AxResourceLibrary::GetResourceLibrary | ( | ) | [inline, static] |
Gets the (one) instance of the manager.
| AxResourceInfo * AxResourceLibrary::GetSelectedBook | ( | ) | const |
Get selected item (index into the array of books).
| int AxResourceLibrary::GetSelection | ( | ) | const [inline] |
Get selected item (index into the array of books).
| bool AxResourceLibrary::GetSelections | ( | wxArrayInt & | selections | ) |
Get all selections.
| const AxResourceLibrarySettings& AxResourceLibrary::GetSettings | ( | ) | const [inline] |
| AxResourceLibrarySettings& AxResourceLibrary::GetSettings | ( | ) | [inline] |
Get settings.
| int AxResourceLibrary::GetSortByCol | ( | ) | const [inline] |
Instantiate the keyword provider.
Set/get column to sort on
| const wxSize& AxResourceLibrary::GetSummaryCoverSize | ( | ) | const [inline] |
Get the default cover design.
Get ebook download manager Set/get cover summary/thumbnail sizes
| const wxSize& AxResourceLibrary::GetThumbnailCoverSize | ( | ) | const [inline] |
| void AxResourceLibrary::Init | ( | ) |
| bool AxResourceLibrary::Initialize | ( | ) | [virtual] |
Initialize modules etc.
| bool AxResourceLibrary::IsFileInIndex | ( | const AxResourceInfoArray & | books, | |
| const wxString & | filename | |||
| ) | const |
| bool AxResourceLibrary::IsFileInIndex | ( | const wxString & | filename | ) | const |
Is this file in the index?
| bool AxResourceLibrary::IsFileSupported | ( | const wxString & | filename | ) | const |
Is this file supported?
| bool AxResourceLibrary::IsProcessingDisabled | ( | ) | const [inline] |
| bool AxResourceLibrary::LoadEpubBookInfo | ( | const wxString & | filename, | |
| AxResourceInfo & | info, | |||
| bool | makeThumbnail, | |||
| const wxSize & | thumbnailImageSize, | |||
| bool & | foundCoverImage | |||
| ) |
Load information from epub file.
| bool AxResourceLibrary::LoadFromFolder | ( | AxResourceInfoArray & | books, | |
| const wxString & | folder, | |||
| bool | clearFirst = true, |
|||
| bool | checkIfFileLoaded = false, |
|||
| bool | allocId = true | |||
| ) | [virtual] |
| bool AxResourceLibrary::LoadFromFolder | ( | const wxString & | folder, | |
| bool | clearFirst = true, |
|||
| bool | checkIfFileLoaded = false | |||
| ) | [virtual] |
Load books from a folder.
| bool AxResourceLibrary::LoadFromFolders | ( | const wxArrayString & | folders, | |
| bool | clearFirst = true, |
|||
| bool | checkIfFileLoaded = false | |||
| ) | [virtual] |
Load books from a set of folders.
| bool AxResourceLibrary::LoadImageFromCoverDesign | ( | AxResourceInfo & | info, | |
| const wxSize & | thumbnailImageSize | |||
| ) |
Load image from cover book or default design.
| bool AxResourceLibrary::LoadLibrary | ( | ) | [virtual] |
Load the library.
| bool AxResourceLibrary::Match | ( | AxResource & | resource, | |
| const wxString & | field, | |||
| const wxString & | value, | |||
| int | flags | |||
| ) | [virtual] |
Match?
| void AxResourceLibrary::operator= | ( | const AxResourceLibrary & | library | ) | [inline] |
| bool AxResourceLibrary::PurgeDeletedFiles | ( | ) |
Purge files that no longer exist.
| bool AxResourceLibrary::Read | ( | const wxString & | filename, | |
| int | flags = 0 | |||
| ) | [virtual] |
| bool AxResourceLibrary::Read | ( | wxInputStream & | stream, | |
| wxDataInputStream & | dataStream, | |||
| int | flags = 0 | |||
| ) | [virtual] |
| bool AxResourceLibrary::RecursivelyFindFiles | ( | const wxString & | folder, | |
| AxFolders & | folders | |||
| ) |
Recursively find all supported files.
| bool AxResourceLibrary::RefreshAll | ( | ) | [virtual] |
Refresh the display using current settings TODO reflect current settings!
| bool AxResourceLibrary::RefreshLibrary | ( | bool | clearAll, | |
| bool | interactive, | |||
| wxWindow * | parent = NULL | |||
| ) | [virtual] |
Refresh the library.
| bool AxResourceLibrary::RemoveResource | ( | int | sel, | |
| bool | interactive = true, |
|||
| wxWindow * | win = NULL | |||
| ) |
Remove resource from library.
| bool AxResourceLibrary::RemoveSelectedBooks | ( | bool | interactive = true, |
|
| wxWindow * | win = NULL | |||
| ) |
Remove resources from library.
| bool AxResourceLibrary::SaveLibrary | ( | bool | forceConsolidatedWrite = false |
) | [virtual] |
Save the library.
| void AxResourceLibrary::SetCommandManager | ( | wxEditorCommandManager * | manager | ) | [inline] |
Set//get the optional command manager object that can be used to launch viewers.
TODO: consider replacing with a virtual function that can be overridden by a derived library class. However, we may wish to give all resource handling functionality more than just 'launch this file'.
| void AxResourceLibrary::SetLastIdentifier | ( | long | id | ) | [inline] |
| void AxResourceLibrary::SetModified | ( | bool | mod | ) | [inline] |
| void AxResourceLibrary::SetSelection | ( | int | sel, | |
| bool | select = true | |||
| ) |
Set selection.
| void AxResourceLibrary::SetSettings | ( | const AxResourceLibrarySettings & | settings | ) | [inline] |
Set settings.
| void AxResourceLibrary::SetSingleSelection | ( | int | sel | ) |
Set single selection, clearing others.
| void AxResourceLibrary::SetSortByCol | ( | int | col | ) | [inline] |
| void AxResourceLibrary::SetSummaryCoverSize | ( | const wxSize & | sz | ) | [inline] |
| void AxResourceLibrary::SetThumbnailCoverSize | ( | const wxSize & | sz | ) | [inline] |
| void AxResourceLibrary::Sort | ( | int | col | ) | [virtual] |
Sort the working set.
| bool AxResourceLibrary::Uninitialize | ( | ) | [virtual] |
Uninitialize modules etc.
| void AxResourceLibrary::UpdateSelectedBookInfo | ( | int | idx, | |
| bool | forceClear = false | |||
| ) |
Update main panel according to current document.
| bool AxResourceLibrary::UploadFiles | ( | wxWindow * | parent | ) |
Get the root of the sites branch.
Upload files
| bool AxResourceLibrary::Write | ( | const wxString & | filename, | |
| int | flags = 0 | |||
| ) | [virtual] |
| bool AxResourceLibrary::Write | ( | wxOutputStream & | stream, | |
| wxDataOutputStream & | dataStream, | |||
| int | flags = 0 | |||
| ) | [virtual] |
1.5.8