ctb/include/menu.h

Go to the documentation of this file.
00001 #ifndef __MENU_H__
00002 #define __MENU_H__
00003 
00004 /**
00005  * File Name  : menu.h
00006  *
00007  * Description: Control the popup menus of the content browser
00008  */
00009 
00010 /*
00011  * This file is part of ctb.
00012  *
00013  * ctb is free software: you can redistribute it and/or modify
00014  * it under the terms of the GNU General Public License as published by
00015  * the Free Software Foundation, either version 2 of the License, or
00016  * (at your option) any later version.
00017  *
00018  * ctb is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00021  * GNU General Public License for more details.
00022  *
00023  * You should have received a copy of the GNU General Public License
00024  * along with this program. If not, see <http://www.gnu.org/licenses/>.
00025  */
00026 
00027 /**
00028  * Copyright (C) 2008 iRex Technologies B.V.
00029  * All rights reserved.
00030  */
00031 
00032 
00033 //----------------------------------------------------------------------------
00034 // Include Files
00035 //----------------------------------------------------------------------------
00036 
00037 #include "filemodel.h"
00038 #include "fileview.h"
00039 
00040 G_BEGIN_DECLS
00041 
00042 // menus for content browser
00043 #define MENU_CONTENT             "ctb_menu_content"
00044 #define MENU_CONTENT_MEDIA       "ctb_menu_content_media"
00045 #define MENU_CONTENT_DELETE_MODE "ctb_menu_delete_mode"
00046 #define MENU_CONTENT_RECENT_MODE "ctb_menu_recent_mode"
00047 
00048 //============================================================================
00049 // Public Functions
00050 //============================================================================
00051 
00052 /**---------------------------------------------------------------------------
00053  *
00054  * Name :  menu_init
00055  *
00056  * @brief  Initialise popup menus for content browser
00057  *
00058  * @param  --
00059  *
00060  * @return --
00061  *
00062  *--------------------------------------------------------------------------*/
00063 void menu_init();
00064 
00065 
00066 /**---------------------------------------------------------------------------
00067  *
00068  * Name :  menu_set_text
00069  *
00070  * @brief  Initialise text items in popup menus for content browser
00071  *
00072  * @param  --
00073  *
00074  * @return --
00075  *
00076  *--------------------------------------------------------------------------*/
00077 void menu_set_text();
00078 
00079 
00080 /**---------------------------------------------------------------------------
00081  *
00082  * Name :  menu_show
00083  *
00084  * @brief  Set the context menu to show in the popup menu
00085  *
00086  * @param  --
00087  *
00088  * @return --
00089  *
00090  *--------------------------------------------------------------------------*/
00091 void menu_show();
00092 
00093 void menu_hide();
00094 
00095 
00096 /**---------------------------------------------------------------------------
00097  *
00098  * Name :  menu_select_view_type
00099  *
00100  * @brief  Set the specified option in the "View" group to selected
00101  *
00102  * @param  [in] view_type - currently active view type
00103  *
00104  * @return --
00105  *
00106  *--------------------------------------------------------------------------*/
00107 void menu_select_view_type (ctb_viewtypes_t view_type);
00108 
00109 
00110 void menu_update_view_mode(ctb_viewmodes_t view_mode);
00111 
00112 
00113 /**---------------------------------------------------------------------------
00114  *
00115  * Name :  menu_select_sort_order
00116  *
00117  * @brief  Set the specified option in the "Sort" group to selected
00118  *
00119  * @param  [in] sort_order - currently active sorting order
00120  *
00121  * @return --
00122  *
00123  *--------------------------------------------------------------------------*/
00124 void menu_select_sort_order(const ctb_sort_order_t sort_order);
00125 
00126 
00127 /**---------------------------------------------------------------------------
00128  *
00129  * Name :  menu_set_current_is_media
00130  *
00131  * @brief  Specifies whether to show "special" menu for media or not.
00132  *
00133  * @param  [in] is_desktop - whether or not to show the "media" menu
00134  *
00135  * @return --
00136  *
00137  *--------------------------------------------------------------------------*/
00138 void menu_set_current_is_media(const gboolean is_media);
00139 
00140 
00141 void menu_set_category(const char* name);
00142 
00143 
00144 //----------------------------------------------------------------------------
00145 // Callbacks from popupmenu
00146 //----------------------------------------------------------------------------
00147 
00148 /**---------------------------------------------------------------------------
00149  *
00150  * Name :  menu_on_goto_location
00151  *
00152  * @brief  Go to the specified location
00153  *
00154  * @param  [in] location - location to display
00155  *
00156  * @return --
00157  *
00158  *--------------------------------------------------------------------------*/
00159 void menu_on_goto_location(const gchar *location);
00160 
00161 
00162 /**---------------------------------------------------------------------------
00163  *
00164  * Name :  menu_on_item_activated
00165  *
00166  * @brief  Handle a menu button that has been pressed by the user
00167  *
00168  * @param  [in] item  - item name of the activated item
00169  * @param  [in] group - name of the parent group of the activated item
00170  * @param  [in] menu  - name of the current menu
00171  * @param  [in] state - state of the item when activated
00172  *
00173  * @return --
00174  *
00175  *--------------------------------------------------------------------------*/
00176 void menu_on_item_activated(const gchar *item,
00177                             const gchar *group,
00178                             const gchar *menu,
00179                             const gchar *state);
00180 
00181 G_END_DECLS
00182 
00183 #endif
00184 
Generated by  doxygen 1.6.2-20100208