home *** CD-ROM | disk | FTP | other *** search
- *******************************************************************************
- * PROGRAM: View.mnu
- *
- * WRITTEN BY: Borland Samples Group
- *
- * DATE: 1/94
- *
- * UPDATED: 6/94
- *
- * REVISION: $Revision: 1.25 $
- *
- * VERSION: dBASE FOR WINDOWS 5.0
- *
- * DESCRIPTION: This is a menu file used by all view forms in the Musical
- * Methods application. It allows seeing information in different
- * orders (depending on which view you are running), setting
- * filters, searching, printing reports, and bringing up as many
- * possible views as you like. All these views are kept track of
- * in the Windows menu.
- *
- * PARAMETERS: F (parent form)
- *
- * CALLS: None
- *
- * USAGE: F.MenuFile = "View.mnu"
- *
- *******************************************************************************
- #include <Messdlg.h>
- ** END HEADER -- do not remove this line*
- * Generated on 05/16/94
- *
- Parameter FormObj
- NEW VIEW(FormObj,"Root")
- CLASS VIEW(FormObj,Name) OF MENU(FormObj,Name)
- this.Text = ""
- this.HelpFile = ""
- this.HelpId = ""
-
- DEFINE MENU FILEMENU OF THIS;
- PROPERTY;
- Text "&File",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU EXIT OF THIS.FILEMENU;
- PROPERTY;
- OnClick CLASS::EXITMUSIC,;
- Text "E&xit",;
- HelpFile "",;
- HelpId "",;
- Shortcut "CTRL-Q"
-
- DEFINE MENU VIEWMENU OF THIS;
- PROPERTY;
- Text "&View",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU MUSICVIEW OF THIS.VIEWMENU;
- PROPERTY;
- OnClick {;do MusiView.wfm},;
- StatusMessage "Display available musical items.",;
- Text "&Music",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU CATEGORIES OF THIS.VIEWMENU;
- PROPERTY;
- OnClick {;do Categors.wfm},;
- StatusMessage "Display the musical categories available.",;
- Text "&Categories",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU RANKINGS OF THIS.VIEWMENU;
- PROPERTY;
- OnClick {;do Priorits.wfm},;
- StatusMessage "Display the sales rankings of the current musical items.",;
- Text "&Rankings",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU MEDIATYPES OF THIS.VIEWMENU;
- PROPERTY;
- OnClick {;do Configs.wfm},;
- StatusMessage "Display the media types available.",;
- Text "M&edia Types",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU SEPARATEVIEWS1 OF THIS.VIEWMENU;
- PROPERTY;
- HelpFile "",;
- HelpId "",;
- Separator .T.
-
- DEFINE MENU ORGANIZEVIEW OF THIS.VIEWMENU;
- PROPERTY;
- Text "&Organization",;
- StatusMessage "Change viewing order of displayed information.",;
- HelpFile "",;
- HelpId ""
-
-
- DEFINE MENU BYRANK OF THIS.VIEWMENU.ORGANIZEVIEW;
- PROPERTY;
- OnClick CLASS::CALLSHOWRANKVIEW,;
- StatusMessage "Order items by Rank.",;
- Text "&Rank",;
- HelpFile "",;
- HelpId "",;
- Checked .T.
-
- DEFINE MENU BYARTIST OF THIS.VIEWMENU.ORGANIZEVIEW;
- PROPERTY;
- OnClick CLASS::CALLSHOWARTISTSVIEW,;
- StatusMessage "Order items by Artist.",;
- Text "&Artist",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU BYTITLE OF THIS.VIEWMENU.ORGANIZEVIEW;
- PROPERTY;
- OnClick CLASS::CALLSHOWTITLESVIEW,;
- StatusMessage "Order items by Title",;
- Text "&Title",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU SEPARATEVIEWS2 OF THIS.VIEWMENU;
- PROPERTY;
- HelpFile "",;
- HelpId "",;
- Separator .T.
-
- DEFINE MENU FILTERVIEW OF THIS.VIEWMENU;
- PROPERTY;
- OnClick CLASS::FILTERVIEW,;
- StatusMessage "Select a group of items to view.",;
- Text "&Filter",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU BROWSE OF THIS.VIEWMENU;
- PROPERTY;
- OnClick CLASS::CALLBROWSEVIEW,;
- StatusMessage "View the items in Browse mode.",;
- Text "&Browse",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU SEARCHMENU OF THIS;
- PROPERTY;
- Text "&Search",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU SEARCH_FOR OF THIS.SEARCHMENU;
- PROPERTY;
- OnClick CLASS::SEARCHFOR,;
- Text "&Search for...",;
- HelpFile "",;
- HelpId "",;
- Shortcut "CTRL-S"
- DEFINE MENU SKIP OF THIS.SEARCHMENU;
- PROPERTY;
- OnClick CLASS::SKIP,;
- Text "S&kip...",;
- HelpFile "",;
- HelpId "",;
- Shortcut "CTRL-K"
-
- DEFINE MENU OPTIONSMENU OF THIS;
- PROPERTY;
- Text "&Options",;
- HelpFile "",;
- HelpId ""
-
- DEFINE MENU REPORTSMENU OF THIS.OPTIONSMENU;
- PROPERTY;
- OnClick CLASS::REPORT,;
- StatusMessage "View report of top ten artists.",;
- Text "&Report -- Top Ten Artists",;
- HelpFile "",;
- HelpId ""
-
-
- *******************************************************************************
- procedure ExitMusic
- *******************************************************************************
-
- * This is the last procedure to be executed before the program completes.
- private i,strCnt,winMenu,f
- if type("form") <> "U" && If forms are open, close them
- if windowCnt > 0
- winMenu = this.parent.parent.WindowMenu
- for i = 1 to windowCnt
- strCnt = ltrim(str(i))
- if type("winMenu.Window&strCnt") <> "U" && if there is a form
- f = winMenu.Window&strCnt..form
- f.Onclose = .f. && don't need to do onclose calculations
- f.Close()
- endif
- next i
- else
- form.Close() && Original image form
- endif
- endif
- if type("oldFrameText") <> "U" && If not running this form standalone
- _app.framewin.text = oldFrameText
- start.Close()
- set path to &savePath
- release oldFrameText,savePath,focusForm,windowCnt,startForm
- endif
- set message to && Clear reference to help file
- set help to
-
- shell(.t.)
-
- *******************************************************************************
- procedure FilterView
-
- *******************************************************************************
- private filterForm, selected, tempFilt, curTable
-
- curTable = alias()
- if .not. empty(form.filter)
- if ConfirmationMessage(FormatStr(;
- "Current filter is\n %1.\n" +;
- "Do you want to turn it off?",;
- form.filter),;
- "Confirmation") = YES
- select music
- set filter to
- go top
- select &curTable
- set filter to
- go top
- form.filter = ""
- SetTopBotRecs(form)
- endif
- else
- set procedure to filter.wfm additive
- filterForm = new FilterForm()
- filterForm.mdi = .f.
- filterForm.viewForm = form
- selected = filterForm.ReadModal()
- if type("selected") = "O" .and. selected.id <> 0
- && If Cancel wasn't pressed
- SetTopBotRecs(form)
- endif
- filterForm.Release()
- form.SetFocus()
- if alias() = "MUSIC" && If in Musiview form view, call its OnNavigate
- form.OnNavigate()
- endif
- endif
-
-
-
- *******************************************************************************
- procedure CallShowArtistsView
- *******************************************************************************
- ShowArtistsView(this,form)
-
- *******************************************************************************
- procedure CallShowTitlesView
- *******************************************************************************
- ShowTitlesView(this,form)
-
- *******************************************************************************
- procedure CallShowRankView
- *******************************************************************************
- ShowRankView(this,form)
-
-
- *******************************************************************************
- procedure CallBrowseView
- *******************************************************************************
- BrowseView(this,form) && In the current form's file
-
-
- *******************************************************************************
- procedure SearchFor
- *******************************************************************************
- private searchForm, searchResult, saveFields, field2
- if .not. empty(form.filter)
- if ConfirmationMessage(FormatStr(;
- "Current filter is\n %1.\n" +;
- "Do you want to turn it off?",;
- form.filter),;
- "Confirmation") = YES
- set filter to
- form.filter = ""
- endif
- endif
- saveFields = setto("fields")
- if alias() <> "MUSIC" && Make only the Descript field available.
- field2 = field(2)
- set fields to
- set fields to &field2
- else
- set fields to
- endif
- set procedure to search.wfm additive
- searchForm = new SearchForm()
- searchForm.mdi = .f.
- searchResult = searchForm.Readmodal()
- searchForm.Release()
- set fields to &saveFields
- if alias() = "MUSIC" && If in Musiview form view, call its OnNavigate
- form.OnNavigate()
- endif
-
- *******************************************************************************
- procedure Skip
- *******************************************************************************
- local skipForm
-
- set procedure to Skip.wfm additive
- skipForm = new SkipForm()
- skipForm.mdi = .f. && Do this here so can use Form Designer on form
- skipForm.ReadModal()
- skipForm.Release()
- if alias() = "MUSIC" && If in Musiview form view, call its OnNavigate
- form.OnNavigate()
- endif
-
-
-
-
- *******************************************************************************
- procedure Report
- *******************************************************************************
- report form Top10Ar && Top 10 Artists
-
- ENDCLASS
-
-
-