Exemplo n.º 1
0
IMAGE *get_masked_image(const char *name, const char *mask)
{
    char complete_name[MAX_FILENAME_LEN];
    complete_name[0] = '\0';
    strncat(complete_name, name, MAX_FILENAME_LEN - 1);
    strncat(complete_name, mask, MAX_FILENAME_LEN - 1);

    /* If the image has already been added, just return it */
    IMAGE *masked_img = IMG(complete_name);
    if (masked_img != NULL) {
        return masked_img;
    }

    /* Load the image */
    IMAGE *orig_img = IMG(name);
    assert(orig_img);

    /* Load the mask */
    IMAGE *mask_img = IMG(mask);
    assert(mask_img);

    /* Create a canvas to draw the newly created image to */
    IMAGE *canvas = al_create_bitmap(al_get_bitmap_width(orig_img), al_get_bitmap_height(orig_img));
    assert(canvas);

    /* STORE Allegro state */
    /* See http://liballeg.org/a5docs/trunk/graphics.html#drawing-operations */
    ALLEGRO_STATE state;
    al_store_state(&state, ALLEGRO_STATE_TARGET_BITMAP | ALLEGRO_STATE_BLENDER);

    /* First, draw the original image to the canvas */
    al_set_target_bitmap(canvas);
    al_clear_to_color(al_map_rgb(255, 0, 255));
    al_draw_bitmap(orig_img, 0, 0, 0);

    /* Second, add the mask */
    al_set_blender(ALLEGRO_ADD, ALLEGRO_DEST_COLOR, 0);
    al_draw_bitmap(mask_img, 0, 0, 0);

    /* RESTORE Allegro state */
    al_restore_state(&state);

    /* Add it to the collection of resources */
    insert_image_resource(complete_name, canvas);

    return canvas;
}
Exemplo n.º 2
0
s32 main(s32 argc, const char* argv[])
{
	padInfo padinfo ;
	padData paddata ;
	sysUtilRegisterCallback(SYSUTIL_EVENT_SLOT0, eventHandler, NULL);

	ioPadInit(7);

	pngData png;
	
	NoRSX *GFX = new NoRSX();
	Image IMG(GFX);
	Background BG(GFX);
	Object OBJ(GFX);
	Font F(GFX);
	

	IMG.LoadPNG_Buf(NoRSX_Image_bin,NoRSX_Image_bin_size, &png);
	u32 imgX =(GFX->width/2)-(png.width/2), imgY = (GFX->height/2)-(png.height/2);
	exitapp = 1;
	int frame=0;
	while(exitapp){
		static time_t starttime = 0;
		double fps = 0;
		if (starttime == 0) starttime = time (NULL);
		else fps = frame / difftime (time (NULL), starttime);
		ioPadGetInfo(&padinfo);
		if(padinfo.status[0]){
			ioPadGetData(0, &paddata);
			if(paddata.BTN_CROSS){
				exitapp = 0;
			}
		}
		BG.Mono(0xb4e83a); //a green hex color (you can use hex colors insted of COLOR_XXXXXXX)
		OBJ.Circle(400,900,100,COLOR_YELLOW);
		OBJ.Rectangle(500,400,200,500,COLOR_ORANGE);
		OBJ.Line(400,400,900,100,COLOR_GREY);
		IMG.AlphaDrawIMG(imgX,imgY,&png);
		F.Printf(150,200,COLOR_BLACK,"SCREEN %d X %d",GFX->width,GFX->height);
		F.Print(150,250,COLOR_YELLOW,"PRESS X TO EXIT");
		F.Printf(150,100,COLOR_GREEN,"FPS %f", fps);
		GFX->Flip();
		frame ++;
		sysUtilCheckCallback();
	}
	GFX->NoRSX_Exit();
	ioPadEnd();
	return 0;
}
Exemplo n.º 3
0
void SearchTabWidget::setHighlight(int highlight, QWidget* widget) {
	Search * uw = dynamic_cast<Search*>(widget);
	if (!uw)
        return;

    int pos = indexOf(uw);
	if(( currentIndex() != pos) && highlight > uw->highlighted() )
	{
		uw->setHighlighted(highlight);

		if (uw->highlighted() > 0) {
			// Icon on tab
			tabBar()->setTabIcon(pos, QIcon(IMG("new-element")));
		}
		if (uw->highlighted() > 1) {
			// Red tab
			tabBar()->setTabTextColor(pos, QColor(255, 0, 0));
		}
	} else if (highlight == 0) {
		tabBar()->setTabTextColor(pos, tabBar()->palette().buttonText().color());
		tabBar()->setTabIcon(pos, QIcon());
	}
}
Exemplo n.º 4
0
void ChatRooms::setHighlight(int highlight, QWidget* chatwidget) {

	ChatRoom * uw = dynamic_cast<ChatRoom*>(chatwidget);
	PublicChat * pc = dynamic_cast<PublicChat*>(chatwidget);

    if (!uw && !pc)
        return;

	int pos;
	int tabHighlighted;
	if (uw) {
        pos = indexOf(uw);
        tabHighlighted = uw->highlighted();
	}
	else {
	    pos = indexOf(pc);
        tabHighlighted = pc->highlighted();
	}

	if(( currentIndex() != pos) && highlight > tabHighlighted )
	{
        if (uw)
            uw->setHighlighted(highlight);
        else
            pc->setHighlighted(highlight);

		if (highlight > 0)// Icon on tab
			tabBar()->setTabIcon(pos, QIcon(IMG("new-element")));
		if (highlight > 1)// Red tab
			tabBar()->setTabTextColor(pos, QColor(255, 0, 0));

	} else if (highlight == 0){
		tabBar()->setTabTextColor(pos, tabBar()->palette().buttonText().color());
		tabBar()->setTabIcon(pos, QIcon());
	}
}
Exemplo n.º 5
0
Searches::Searches(QWidget* parent, const char* name)
         : QWidget(parent) {

	QVBoxLayout* vbox = new QVBoxLayout(this);
	QHBoxLayout* hbox = new QHBoxLayout;
	vbox->addLayout(hbox);
	hbox->setMargin(5);
	hbox->setSpacing(5);
	mEntry = new QComboBox(this);
	mEntry->setEditable(true);
	hbox->addWidget(mEntry);
	mEntry->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);

	mUserLabel =  new QLabel(tr("User:"******"search-small");
	mSearch = new QPushButton(tr("Search"));
	hbox->addWidget(mSearch);
	mSearch->setIcon(searchIcon);
	QGroupBox * methods = new QGroupBox(tr("Method"), this);
	vbox->addWidget(methods);
	QHBoxLayout* methodsLayout = new QHBoxLayout(methods);
	methodsLayout->setMargin(2);
	mGlobal = new QRadioButton(this);
	mGlobal->setText(tr("Global"));
	mGlobal->setChecked(true);
	methodsLayout->addWidget(mGlobal);
	mRooms = new QRadioButton(mGlobal);
	mRooms->setText(tr("Rooms"));
	methodsLayout->addWidget(mRooms);
	mBuddies = new QRadioButton(mGlobal);
	mBuddies->setText(tr("Buddies"));
	methodsLayout->addWidget(mBuddies);
	mWishList = new QRadioButton(mGlobal);
	mWishList->setText(tr("WishList"));
	methodsLayout->addWidget(mWishList);
	mUser = new QRadioButton(mGlobal);
	mUser->setText(tr("User"));
	methodsLayout->addWidget(mUser);

	searchModeSelected();
	connect(mEntry->lineEdit(), SIGNAL(returnPressed()), SLOT(doSearch()));
	connect(mUserEntry->lineEdit(), SIGNAL(returnPressed()), SLOT(doSearch()));
	connect(mUser, SIGNAL(toggled(bool)), SLOT(searchModeSelected()));
	connect(mSearch, SIGNAL(clicked()), SLOT(doSearch()));

    mSearchTabWidget = new SearchTabWidget(this);
	mInterests = new Interests(mSearchTabWidget);
	mInterests->setDisabled(true);
	vbox->addWidget(mSearchTabWidget);
	vbox->addWidget(mInterests);
	mSearchTabWidget->addTab(mInterests, tr("*Interests*"));

	mWishListView = new WishList(mSearchTabWidget);
	mWishListView->setDisabled(true);
	vbox->addWidget(mWishListView);
	mSearchTabWidget->addTab(mWishListView, tr("*Wishlist*"));

	connect(museeq, SIGNAL(searchResults(uint, const QString&, bool, uint, uint, const NFolder&)), SLOT(append(uint, const QString&, bool, uint, uint, const NFolder&)));
	connect(museeq, SIGNAL(searchToken(const QString&, uint)), SLOT(setToken(const QString&, uint)));
	connect(museeq, SIGNAL(connectedToServer(bool)), mEntry, SLOT(setEnabled(bool)));
	connect(museeq, SIGNAL(connectedToServer(bool)), mSearch, SLOT(setEnabled(bool)));
	connect(museeq, SIGNAL(connectedToServer(bool)), mInterests, SLOT(setEnabled(bool)));
	connect(museeq, SIGNAL(connectedToServer(bool)), mWishListView, SLOT(setEnabled(bool)));
	connect(mSearchTabWidget, SIGNAL(currentChanged(QWidget*)), SLOT(tabSelected(QWidget*)));
}
Exemplo n.º 6
0
PerfPanel::PerfPanel(wxWindow *frame) : wxPanel(frame)
{
#define IMG(fn) wxBitmap(wxString("./Images/")+wxString(fn)+wxString(".bmp"),wxBITMAP_TYPE_ANY)
int panel_border=10;
	UpdateFS_src();
	wxSizer* sz = new wxBoxSizer(wxVERTICAL);
	sz->AddSpacer(panel_border);
	wxSize left_size(100,30);
	wxSizer* sz1 = new wxBoxSizer(wxHORIZONTAL);
	sz1->AddSpacer(panel_border);

	wxButton*btn_up = new wxBitmapButton(this,5,IMG("small_add"));
	btn_up->SetToolTip(MY_TXT("Add selected rendering method","Добавить выбранный метод рендеринга"));
	btn_up->Show(0);


	m_box_rmode = new wxChoice(this,3);
	for(int i=0;i<CT::iso->rendering_methods.size();i++)
	{
		m_box_rmode->Append(CT::iso->rendering_methods[i]->caption);
	}
	m_box_rmode->Select(0);
	//sz->Add(new wxStaticText(this,wxID_ANY,MY_TXT("Rendering method","Метод рендеринга"),wxDefaultPosition,left_size),0,wxSTRETCH_NOT);
	sz1->Add(m_box_rmode,1,wxGROW);
	sz1->Add(btn_up,0,wxSTRETCH_NOT);
	sz1->AddSpacer(panel_border);
	sz->Add(sz1,0,wxEXPAND);
	sz->AddSpacer(panel_border);

	//sz->Add(m_box_rmode,0,wxEXPAND);
//
	sz1 = new wxBoxSizer(wxHORIZONTAL);
	sz1->AddSpacer(panel_border);
	m_box_rtype = new wxChoice(this,2);
	m_box_rtype->Append(MY_TXT("Permanent","Постоянный"));
	m_box_rtype->Append(MY_TXT("When something has changed","При изменениях"));
	m_box_rtype->Append(MY_TXT("Frames accumulation","Накопление кадров"));
	//m_box_rtype->Append(MY_TXT("Use LoD when changing","Использовать LoD при изменении"));
	m_box_rtype->Select(CT::RenderingType);
	sz1->Add(new wxStaticText(this,wxID_ANY,MY_TXT("Rendering type","Тип рендеринга"),wxDefaultPosition,left_size),0,wxSTRETCH_NOT);
	sz1->Add(m_box_rtype,1,wxGROW);
	sz1->AddSpacer(panel_border);
	sz->Add(sz1,0,wxEXPAND);
//
	sz1 = new wxBoxSizer(wxHORIZONTAL);
	sz1->AddSpacer(panel_border);
	m_slider_z[0] = new wxSlider(this,1,100,1,500);
	sz1->Add(new wxStaticText(this,wxID_ANY,MY_TXT("Rendering quality","Качество рендеринга"),wxDefaultPosition,left_size),0,wxSTRETCH_NOT);
	sz1->Add(m_slider_z[0],1,wxGROW);
	sz1->AddSpacer(panel_border);
	sz->Add(sz1,0,wxEXPAND);

	sz1 = new wxBoxSizer(wxHORIZONTAL);
	sz1->AddSpacer(panel_border);
	m_slider_z[2] = new wxSlider(this,8,100,0,400);
	sz1->Add(new wxStaticText(this,wxID_ANY,MY_TXT("Interaction quality","???"),wxDefaultPosition,left_size),0,wxSTRETCH_NOT);
	sz1->Add(m_slider_z[2],1,wxGROW);
	sz1->AddSpacer(panel_border);
	sz->Add(sz1,0,wxEXPAND);

	sz1 = new wxBoxSizer(wxHORIZONTAL);
	sz1->AddSpacer(panel_border);
	m_slider_z[1] = new wxSlider(this,6,50,0,100);
	sz1->Add(new wxStaticText(this,wxID_ANY,MY_TXT("Fast resolution","Быстрое разрешение"),wxDefaultPosition,left_size),0,wxSTRETCH_NOT);
	sz1->Add(m_slider_z[1],1,wxGROW);
	sz1->AddSpacer(panel_border);
	sz->Add(sz1,0,wxEXPAND);


	sz1 = new wxBoxSizer(wxHORIZONTAL);
	sz1->AddSpacer(panel_border);
	m_box_shading_type = new wxChoice(this,6);
	m_box_shading_type->Append(MY_TXT("No","Нет"));
	m_box_shading_type->Append(MY_TXT("Phong","Фонг"));
	sz1->Add(new wxStaticText(this,wxID_ANY,MY_TXT("Shading model","Модель затенения"),wxDefaultPosition,left_size),0,wxSTRETCH_NOT);
	sz1->Add(m_box_shading_type,1,wxGROW);
	sz1->AddSpacer(panel_border);
	sz->Add(sz1,0,wxEXPAND);
/*
	m_box_shading_type = new wxChoice(this,6);
	m_box_shading_type->Append(MY_TXT("No","Нет"));
	m_box_shading_type->Append(MY_TXT("Phong","Фонг"));
	sz->Add(new wxStaticText(this,wxID_ANY,MY_TXT("Shading model","Модель затенения"),wxDefaultPosition,left_size),0,wxSTRETCH_NOT);
	sz->Add(m_box_shading_type,1,wxGROW);
*/
	sz1 = new wxBoxSizer(wxHORIZONTAL);
	sz1->AddSpacer(panel_border);
	m_box_tf = new wxChoice(this,7);
	m_box_tf->Append(MY_TXT("1D Gray","1D Серая"));
	m_box_tf->Append(MY_TXT("1D Colored","1D цветная"));
	sz1->Add(new wxStaticText(this,wxID_ANY,MY_TXT("Transfer function","Раскраска"),wxDefaultPosition,left_size),0,wxSTRETCH_NOT);
	sz1->Add(m_box_tf,1,wxGROW);
	sz1->AddSpacer(panel_border);
	sz->Add(sz1,0,wxEXPAND);

//	m_check_box_autofps = new wxCheckBox(this,4,MY_TXT("Permanent rendering","Постоянный рендеринг"),ster+wxPoint(0,100));
	m_check_use_accel_struct = new wxCheckBox(this,4,MY_TXT("Use acceleration structure","Использовать ускоряющую структуру"));
	m_check_use_accel_struct->Show(0);
	m_check_use_cubic_filt = new wxCheckBox(this,4,MY_TXT("Tricubic filtering","Трикубическая фильтрация"));
	m_check_bicubic_filtering = new wxCheckBox(this,4,MY_TXT("Bicubic filtering","Бикубическая фильтрация"));

	sz->Add(m_check_use_accel_struct,0,wxSTRETCH_NOT);

	sz1 = new wxBoxSizer(wxHORIZONTAL);
	sz1->AddSpacer(panel_border);
	sz1->Add(m_check_use_cubic_filt,0,wxSTRETCH_NOT);
	sz1->Add(m_check_bicubic_filtering,0,wxSTRETCH_NOT);
	sz1->AddSpacer(panel_border);
	sz->Add(sz1,0,wxEXPAND);
	
	SetSizer(sz);
	
}
Exemplo n.º 7
0
wxString GenerateHTMLString() {
  gCurrentString = _T("");

  AddStringLn(_T("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>"));
  AddStringLn(_T("<html>"));
  AddStringLn(_T("<head>"));
  // Although the file is going to be written as UTF-8, we set the charset here to
  // Western-1252, which is the only format supported by CHM files. The generated HTML files
  // then need to be converted to ANSI using a text editor.
  AddStringLn(_T("<meta http-equiv='content-type' content='text/html; charset=Western-1252'>"));
  AddStringLn(_T("<title>Appetizer</title>"));
  AddStringLn(_T("<style TYPE='text/css'>"));
	AddStringLn(_T("<!--"));
  AddStringLn(_T("h2 { color:#ff4f02; }"));
  AddStringLn(_T("h3 {  }"));
	AddStringLn(_T("-->"));
	AddStringLn(_T("</style>"));

  AddStringLn(_T("</head>"));
  AddStringLn(_T("<body>"));

  IMG(_T("images/Logo.jpg"));  

  // *******************************************************************************
  // INTRODUCTION
  // *******************************************************************************

  H2(_("Introduction"));
  H3(_("About Appetizer"));
  P(_("Appetizer is a free application launcher, or dock, for Windows. It allows organizing and launching your applications and other shortcuts into a convenient dock. The app is skinable and entirely customizable."));
  P(_("Additionally, the application supports the [http://portableapps.com PortableApps] format. So if you use Appetizer on a removable drive in the PortableApps format, the application will detect it and automatically import all your applications along with the 'Documents', 'Videos', 'Music' and 'Pictures' folders."));
  
  // -------------------------------------------------
  // Features
  // -------------------------------------------------
  H3(_("Features"));

  StartList();
  LI(_("Support for multiple skins"));
  LI(_("Support for plugins"));
  LI(_("Resizable dock, which allows displaying the icons both horizontally or vertically."));
  LI(_("Three sizes of icons: Small, large and extra-large"));
  LI(_("Support for custom icons"));
  LI(_("'Wizard' to automatically imports shortcuts from various locations"));
  LI(_("Organize the icons by drag & dropping them"));
  LI(_("'Multi-launch' functionality"));
  LI(_("Regroup multiple shortcuts within one menu"));
  LI(_("Hot key to hide / show the dock"));
  LI(_("Special items to provide extra functionalities: hide / show the desktop, Recycle Bin, Control Panel, etc."));
  LI(_("Support for multiple languages"));
  LI(_("Minimize to tray icon functionality"));
  EndList();

  IMG(_T("images/Screenshot.jpg"));


  // *******************************************************************************
  // USING APPETIZER
  // *******************************************************************************

  AddAnchor(_T("Usage"));
  H2(_("Using Appetizer"));
  P(_("Appetizer is made to be simple and intuitive. To get more information about an icon or a button, simply move the mouse over it. Additionally, try right-clicking the dock in different places - certain parts of the application such as the icons or the icon panel provide various contextual actions."));
  
  // -------------------------------------------------
  // Adding a shortcut
  // -------------------------------------------------
  H3(_("Adding a shortcut"));
  P(_("To add a shortcut, right-click anywhere on the icon panel and select 'New shortcut', then select a file or folder. Alternatively, you may also directly drag and drop a file onto the dock."));

  // -------------------------------------------------
  // Adding a group
  // -------------------------------------------------  
  H3(_("Adding a group of shortcuts"));
  P(_("To create a group of shortcuts, right-click anywhere on the icon panel, select 'New group', give a name to the group, and click 'Save'. To add shortcuts to this group, click or right-click on it and select 'Organize group shortcuts'. The newly opened window display all your shortcuts in a tree-like control. You can drag & drop these icons to add them to the group. You can also reorder them, still by drag & dropping them. Once this is done, click the 'Close' button."));  

  // -------------------------------------------------
  // Adding a special item
  // -------------------------------------------------
  H3(_("Adding a special items"));
  P(_("Special items provide additional functionalities that would not be possible using a normal shortcut. The special items include a 'Show desktop' button, the Recycle Bin, a link to the Control Panel, etc.")); 
  P(_("To add a special item, right-click on the dock and select 'Add special item'.")); 

  // -------------------------------------------------
  // Modifying or deleting a group or shortcut
  // -------------------------------------------------  
  H3(_("Modifying, moving or deleting a group or shortcut"));
  P(_("To change the properties of an icon, such as its name or location, right-click on it and select 'Properties'. To move an icon to a different location, click and drag it. To remove a shortcut, right-click on it and select 'Remove'.")); 

  // -------------------------------------------------
  // Changing the properties of a shortcut or group
  // -------------------------------------------------  
  AddAnchor(_T("FolderItemProperties"));
  H3(_("Changing the properties of a shortcut or group"));
  P(_("To change the properties of a shortcut or group, right-click on an icon and select 'Properties'. The following options are available:"));  
  StartList();
  LI(_("Name: The name displayed in the tooltip"));
  LI(_("Location: The target of the shortcut. Click on the '...' button to change it."));
  LI(_("Parameters: You may also specify some additional command line arguments in this field. This could be a path to a file or some switches specific to the application. This field is only relevant for executables and is optional."));
  LI(_("Icon: Click on 'Change icon' to select a custom icon. Click on 'Use default' to revert the icon to the default."));
  EndList();

  // -------------------------------------------------
  // Minimizing / Maximizing the dock
  // -------------------------------------------------
  H3(_("Minimizing / Maximizing the dock"));
  P(_("The dock can be minimized to the tray icon by clicking on the 'x' button. To bring it back to front, simply click on the tray icon. Note that this behavior can be changed in the 'Configuration' dialog"));
  P(_("Right-click on the tray icon for additional options."));

  // -------------------------------------------------
  // The option panel
  // -------------------------------------------------
  AddAnchor(_T("OptionPanel"));
  H3(_("The option panel"));
  IMG(_T("images/OptionPanel.jpg"));
  P(_("The option panel pops up when you click on the big arrow button. If you move the mouse over any of its buttons, a tooltip will show up giving you more information."));

  // -------------------------------------------------
  // Importing several shortcuts automatically
  // -------------------------------------------------
  AddAnchor(_T("Import"));
  H3(_("Importing several shortcuts automatically"));
  P(_("It is possible to automatically import shortcuts into Appetizer from various locations, including the Windows 'Start menu', the 'Quick Launch' toolbar, or the PortableApps folder. To do so, click on [images/ImportButton.jpg] in the [#OptionPanel option panel] and select where you would like to import shortcuts from, then click 'Start'."));

  // -------------------------------------------------
  // Launching several application simultaneously
  // -------------------------------------------------
  AddAnchor(_T("Multilaunch"));
  H3(_("Launching several application simultaneously"));
  P(_("Appetizer provides a functionality to launch several applications at the click of a button. This is equivalent to the Startup menu on Windows, except that it launches the app on your portable drive. To use this 'Multi-launch' group, follow these steps:"));
  StartList();
  LI(_("Right-click on any icon and select 'Multi-launch group' from the context menu"));
  LI(_("You can add as many shortcuts as you wish"));
  LI(_("To trigger the 'Multi-launch' group, open the [#OptionPanel option panel] and click on the 'Multi-launch' button: [images/Multilaunch.jpg]"));
  EndList();

  // *******************************************************************************
  // PLUGINS
  // *******************************************************************************

  AddAnchor(_T("Plugins"));
  H2(_("Plugins"));
  P(_("Appetizer supports a plugin system that allows easily adding new functionalities and customizing the application to your needs."));

  // -------------------------------------------------
  // Adding new plugins
  // -------------------------------------------------

  AddAnchor(_T("AddingPlugins"));
  H3(_("Adding a plugin"));
  P(_("To add a plugin, follow these steps:"));
  StartList();
  LI(_("Open the [#Configuring Configuration dialog]."));
  LI(_("Open the 'Plugin' tab."));
  LI(_("Click the 'Install...' button and open the plugin's .zpl package."));
  LI(_("If everything went well, you should see a message saying that the plugin was successfully installed. However, note that it will only be active the next time Appetizer is started."));
  EndList();

  // -------------------------------------------------
  // Creating a plugin
  // -------------------------------------------------
  AddAnchor(_T("CreatingPlugin"));
  H3(_("Creating a plugin"));
  P(_("Information on how to create a plugin is available on [http://app.etizer.org/wiki/creating-a-plugin Appetizer's website]"));

  // *******************************************************************************
  // CONFIGURING APPETIZER
  // *******************************************************************************

  AddAnchor(_T("Configuring"));
  H2(_("Configuring Appetizer"));
  P(_("The configuration dialogue is accessible by clicking on the 'Configuration' button in the [#OptionPanel option panel]. The description of each setting is given below:"));

  AddAnchor(_T("ConfiguringGeneral"));

  // -------------------------
  // General
  // -------------------------
  H3(_("General"));
  StartList();
  LI(_("[b]Language:[/b] Select your language here. If you wish to contribute and translate Appetizer in your own language, please [#Translating follow this link]."));  
  LI(_("[b]Always on top:[/b] If this is selected the bar will always remain on top of the other windows."));
  LI(_("[b]Allow only one instance of Appetizer at a time:[/b] If this is selected, only one instance of Appetizer can run at a time."));
  LI(_("[b]Install autorun file:[/b] Clicking this button will install an autorun file on your removable drive. This will allow Appetizer to automatically start when you insert the drive. However, note that in some instances Windows may prevent the autorun from being executed, for example for security reason or because the computer is set that way."));
  LI(_("[b]Check for update:[/b] Click this button to check if a new update is available."));
  EndList();

  // -------------------------
  // Appearance
  // -------------------------
  AddAnchor(_T("ConfiguringAppearance"));
  H3(_("Appearance"));
  StartList();
  LI(_("[b]Icon size:[/b] Choose the size of the icons."));
  LI(_("[b]Orientation:[/b] The bar can be vertically or horizontally orientated."));
  LI(_("[b]Skin:[/b] Choose one of the available skins."));
  EndList();

  // -------------------------
  // Operations
  // -------------------------
  AddAnchor(_T("ConfiguringOperations"));
  H3(_("Operations"));
  StartList();
  LI(_("[b]Auto-hide after launching an application:[/b] Select this option to have Appetizer hides itself each time you launch an application."));
  LI(_("[b]When ejecting the drive, close the apps that are locking it:[/b] If this option is selected, all the apps that are open on your removable drive will be closed when you click on the 'Eject' button."));
  LI(_("[b]Run multi-launch group on startup:[/b] Tick off this option to automatically run the [#Multilaunch multi-launch group] on startup."));
  LI(_("[b]'Close' button minimizes to System Tray:[/b] By default, the application is minimized to the System Tray when the 'Close' button is clicked. Tick off this option to make the 'Close' button actually close the app."));
  LI(_("[b]Hot key to hide / show the bar:[/b] Select the hot key to hide / show the bar. Select 'none' to disable it."));
  EndList();

  // -------------------------
  // Import
  // -------------------------
  AddAnchor(_T("ConfiguringImport"));
  H3(_("Import"));
  StartList();
  LI(_("[b]Exclude these items from the import operations:[/b] Normally, when importing shortcuts using the [#Import import tool], all the executables are added to the dock. If you wish to exclude certain files, add them to this list. The item names may be specified with [http://www.computerhope.com/jargon/w/wildcard.htm wildcards]. Note that this list is also automatically populated whenever you remove a shortcut from the dock."));
  EndList();
	
  // -------------------------
  // Plugins
  // -------------------------
  AddAnchor(_T("ConfiguringPlugins"));
  H3(_("Plugins"));
  P(_("This tab displays the plugins that are currently installed along with their status."));
  StartList();
  LI(_("[b]Enable / Disable buttons:[/b] Click these buttons to enable / disable the selected plugin."));
  LI(_("[b]Install...:[/b] Click to [#AddingPlugins install a new plugin]."));
  EndList();	

  // *******************************************************************************
  // OTHER TIPS
  // *******************************************************************************
  H2(_("Other tips"));
  StartList();
  LI(_("You can resize the dock by clicking and dragging its bottom right corner."));
  LI(_("You can move it by clicking anywhere on the icon panel and dragging."));
  LI(_("The bar will snap to the borders of the screens as you move it."));
  EndList();

  // *******************************************************************************
  // TRANSLATING APPETIZER
  // *******************************************************************************
  AddAnchor(_T("Translating"));
  H2(_("Translating Appetizer"));
  P(wxString::Format(_("If Appetizer is not available in your own language, you can easily create your own translation. Please [%s follow this link] for more information."), _T("http://app.etizer.org/translations/")));

  // *******************************************************************************
  // MORE LINKS
  // *******************************************************************************
  AddAnchor(_T("Links"));
  H2(_("Support and links"));
  P(wxString::Format(_("Official home page: %s"), _T("[http://app.etizer.org http://app.etizer.org]")));
  P(wxString::Format(_("Project home page: %s"), _T("[https://sourceforge.net/projects/appetizer https://sourceforge.net/projects/appetizer]")));
  P(wxString::Format(_("Some information on how to create a plugin: %s"), _T("[http://app.etizer.org/wiki/creating-a-plugin http://app.etizer.org/wiki/creating-a-plugin]")));
  P(wxString::Format(_("Beta versions and preleases are usually on [%s PortableApps Beta Testing forum]"), _T("http://portableapps.com/forums/development/beta_testing")));
  P(wxString::Format(_("For bug reports, suggestions, comments or translations, please contact %s"), imayle));//wxString::Format(_T("<a href=\"mailto:%s\">%s</a> or post on the beta forum."), imayle, imayle)));

  AddStringLn(_T("</body>"));
  AddStringLn(_T("</html>"));

  return gCurrentString;
}
Exemplo n.º 8
0
wxString GenerateHTMLString() {
  gCurrentString = _T("");

  AddStringLn(_T("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.0 Transitional//EN'>"));
  AddStringLn(_T("<html>"));
  AddStringLn(_T("<head>"));
  AddStringLn(_T("<meta http-equiv='content-type' content='text/html; charset=Western-1252'>"));
  AddStringLn(_T("<title>Appetizer</title>"));

  AddStringLn(_T("<style TYPE='text/css'>"));
	AddStringLn(_T("<!--"));
  AddStringLn(_T("h2 { color:#ff4f02; }"));
  AddStringLn(_T("h3 {  }"));
	AddStringLn(_T("-->"));
	AddStringLn(_T("</style>"));

  AddStringLn(_T("</head>"));
  AddStringLn(_T("<body>"));

  IMG(_T("images/Logo.jpg"));  

  // *******************************************************************************
  // INTRODUCTION
  // *******************************************************************************

  H2(_("Introduction"));
  H3(_("About Appetizer"));
  P(_("Appetizer is a dock bar that allows you to organize, display and launch your applications and other shortcuts. Currently it is possible to add executables, documents and folders to the dock. Additionally, if you use Appetizer on a USB key in the [http://portableapps.com PortableApps] format, the application will detect it and automatically import all your applications along with the 'Documents', 'Videos', 'Music' and 'Pictures' folders."));
  
  // -------------------------------------------------
  // Features
  // -------------------------------------------------
  H3(_("Features"));

  StartList();
  LI(_("Resizable dock, which allows displaying the icons both horizontally or vertically."));
  LI(_("Support for multiple skins"));
  LI(_("Two size of icons: Small and large"));
  LI(_("Organize the icons by drag & dropping them"));
  LI(_("'Multi-launch' functionality"));
  LI(_("Regroup multiple shortcuts within one menu"));
  LI(_("Support for multiple languages"));
  LI(_("Minimize to tray icon functionality"));
  EndList();

  IMG(_T("images/Screenshot.jpg"));


  // *******************************************************************************
  // USING APPETIZER
  // *******************************************************************************

  H2(_("Using Appetizer"));
  P(_("Appetizer is made to be simple and intuitive. To get more information about an icon or a button, simply move the mouse over it. Additionally, try right-clicking the dock in different places - certain parts of the application such as the icons or the icon panel provide various contextual actions."));
  
  // -------------------------------------------------
  // Adding a shortcut
  // -------------------------------------------------
  H3(_("Adding a shortcut"));
  P(_("To add a shortcut, right-click anywhere on the icon panel and select 'New shortcut', then click on [images/SelectFile.jpg] to select a file or [images/SelectFolder.jpg] to select a folder. Once this is done, the 'Name' field should be automatically populated based on the file or folder you've chosen. Finally, you may also specify some additional parameters in the 'Parameters' field. This could be a path to a file or some switches specific to the application. This field is only relevant for executables and is optional."));  

  // -------------------------------------------------
  // Adding a group
  // -------------------------------------------------  
  H3(_("Adding a group of shortcuts"));
  P(_("To create a group of shortcuts, right-click anywhere on the icon panel, select 'New group', give a name to the group, and click 'Save'. To add shortcuts to this group, click or right-click on it and select 'Organize group shortcuts'. The newly opened window display all your shortcuts in a tree-like control. You can drag & drop these icons to add them to the group. You can also reorder them in a different, still by drag & dropping them. Once this is done, click the 'Close' button."));  

  // -------------------------------------------------
  // Changing the icon of a group
  // -------------------------------------------------  
  H3(_("Changing the icon of a group"));
  P(_("A group can take the icon of any of the shortcuts it contains. To do so, right-click on a group and select 'Properties'. Then click on 'Select a different icon'. If the group doesn't contain any shortcut, only the default icon can be selected."));  

  // -------------------------------------------------
  // Modifying or deleting a group or shortcut
  // -------------------------------------------------  
  H3(_("Modifying, moving or deleting a group or shortcut"));
  P(_("To change the properties of an icon, such as its name or location, right-click on it and select 'Properties'. To move an icon to a different location, click and drag it. To remove a shortcut, right-click on it and select 'Remove'.")); 

  // -------------------------------------------------
  // Minimizing / Maximizing the dock
  // -------------------------------------------------
  H3(_("Minimizing / Maximizing the dock"));
  P(_("The dock can be minimized to the tray icon by clicking on the 'x' button. To bring it back to front, simply click on the tray icon."));
  P(_("Right-click on the tray icon for additional options."));

  // -------------------------------------------------
  // The option panel
  // -------------------------------------------------
  A(_T(""), _T(""), _T("OptionPanel"));
  H3(_("The option panel"));
  IMG(_T("images/OptionPanel.jpg"));
  P(_("The option panel pops up when you click on the big arrow button. If you move the mouse over any of its buttons, a tooltip will show up giving you more information."));

  // -------------------------------------------------
  // Launching several application simultaneously
  // -------------------------------------------------
  H3(_("Launching several application simultaneously"));
  P(_("Appetizer provides a functionality to launch several applications at the click of a button. This is equivalent to the Startup menu on Windows, except that it launches the app on your portable drive. To use this 'Multi-launch' group, follow these steps:"));
  StartList();
  LI(_("Right-click on any icon and select 'Multi-launch group' from the context menu"));
  LI(_("You can add as many shortcuts as you wish"));
  LI(_("To trigger the 'Multi-launch' group, open the [#OptionPanel option panel] and click on the 'Multi-launch' button: [images/Multilaunch.jpg]"));
  EndList();

  // *******************************************************************************
  // CONFIGURING APPETIZER
  // *******************************************************************************
  H2(_("Configuring Appetizer"));
  P(_("The configuration dialogue is accessible by clicking on the 'Configuration' button in the [#OptionPanel option panel]. The description of each setting is given below:"));

  H3(_("General"));
  StartList();
  LI(_("[b]Language:[/b] Select your language here. If you wish to contribute and translate Appetizer in your own language, please [#Translating follow this link]."));
  LI(_("[b]Auto-hide after launching an application:[/b] Select this option to have Appetizer hides itself each time you launch an application."));
  LI(_("[b]Always on top:[/b] If this is selected the bar will always remain on top of the other windows."));
  LI(_("[b]Allow only one instance of Appetizer at a time:[/b] If this is selected, only one instance of Appetizer can run at a time."));
  LI(_("[b]Check for update:[/b] Click this button to check if a new update is available."));
  EndList();

  H3(_("Appearance"));
  StartList();
  LI(_("[b]Icon size:[/b] Choose the size of the icons, as displayed on the bar."));
  LI(_("[b]Orientation:[/b] The bar can be vertically or horizontally orientated."));
  LI(_("[b]Skin:[/b] Choose one of the available skins."));
  EndList();

  // *******************************************************************************
  // OTHER TIPS
  // *******************************************************************************
  H2(_("Other tips"));
  StartList();
  LI(_("You can resize the dock by clicking and dragging its bottom right corner."));
  LI(_("You can move it by clicking anywhere on the icon panel and dragging."));
  LI(_("The bar will snap to the borders of the screens as you move it."));
  EndList();

  // *******************************************************************************
  // TRANSLATING APPETIZER
  // *******************************************************************************
  A(_T(""), _T(""), _T("Translating"));
  H2(_("Translating Appetizer"));
  P(_("If Appetizer is not available in your own language, you can easily create your own translation. To do so, please follow these steps:"));
  StartList();
  LI(_("[http://www.poedit.net/ Download Poedit] and install it. This is a utility that makes it easier to create and maintain translation files."));
  LI(_("Open the folder where you've installed Appetizer and open the Data\\Locale folder"));
  LI(_("Copy and paste the 'en' folder."));
  LI(_("Within that folder, open 'appetizer.po' with Poedit."));
  LI(_("In Poedit, go into the Catalog menu and click Configuration. Change 'Country' and 'Language' to your own country and language."));
  LI(_("Now, to translate a line of text, click on it and add your translated text in the bottom text field."));
  LI(_("Once all the text is translated, please email 'appetizer.po' and 'appetizer.mo' to [email protected]"));
  EndList();
  P(_("Your translation will be added in the next release."));

  H3(_("Translating the help file"));
  P(_("If you wish to translate the help file, follow the same steps as above and edit the file in Data\\Help\\en\\appetizer.po."));

  AddStringLn(_T("</body>"));
  AddStringLn(_T("</html>"));

  return gCurrentString;
}
Exemplo n.º 9
0
s32 main(s32 argc, const char* argv[])
{
	padInfo padinfo;
	padData paddata;
	ioPadInit(7);

	int Bx=0;
	int By=0;


	pngData *png = new pngData;
	
	NoRSX *GFX = new NoRSX(RESOLUTION_AUTO, RESOLUTION_1280x720); //set defined screen resolution You can change it to:
						    			  //RESOLUTION_720x480 | RESOLUTION_720x576 | RESOLUTION_1280x720 | RESOLUTION_1920x1080
	Image IMG(GFX);
	Background BG(GFX);
	Object OBJ(GFX);
	Bitmap BMap(GFX);
	MsgDialog Msg(GFX);

	NoRSX_Bitmap Precalculated_Layer;	
	
	BMap.GenerateBitmap(&Precalculated_Layer); //Initialize the Bitmap
	
	Font F1(Sans_ttf,Sans_ttf_size ,GFX);   //Loaded from Memory
	Font F2("/dev_flash/data/font/SCE-PS3-VR-R-LATIN2.TTF" ,GFX);  //Loaded from File!
	Font F3(JPN ,GFX);  //I'm Using PS3 Original Fonts! These are the available on the ps3: LATIN2 | JPN | KOR | CGB | KANA
	

	IMG.LoadPNG_Buf(NoRSX_Image_png,NoRSX_Image_png_size, png);

	png = IMG.ResizeImage(png, 500, 500); //pngData* IMG.ResizeImage(pngData*, new width, new height)

	u32 imgX =(GFX->width/2)-(png->width/2), imgY = (GFX->height/2)-(png->height/2);

	BG.MonoBitmap(0xb4e83a,&Precalculated_Layer); //a green hex color (you can use hex colors insted of COLOR_XXXXXXX)

//	IMG.DrawIMGtoBitmap(imgX,imgY,png,&Precalculated_Layer);

	OBJ.CircleToBitmap(500,500,50,COLOR_YELLOW,&Precalculated_Layer);


	F1.PrintfToBitmap(150,200,&Precalculated_Layer,COLOR_RED,"Screen %d x %d",GFX->width,GFX->height);
	F1.PrintfToBitmap(150,250,&Precalculated_Layer,COLOR_BLUE, 35,"Press X to exit! (Start to skip Message Dialogs and exit)");
	F2.PrintfToBitmap(150,300,&Precalculated_Layer,COLOR_GREEN,60,"FreeType2 with TTF support :)");
	F3.PrintfToBitmap(150,500,&Precalculated_Layer,"Written by deroad");

	int frame=0;
	/*
	// Bitmap
	
	GFX->AppStart();
	while(GFX->GetAppStatus()){
		static time_t starttime = 0;
		double fps = 0;
		if (starttime == 0) starttime = time (NULL);
		else fps = frame / difftime (time (NULL), starttime);
		ioPadGetInfo(&padinfo);
		if(padinfo.status[0]){
			ioPadGetData(0, &paddata);
			if(paddata.BTN_CROSS){
				GFX->AppExit();
			}
			if(paddata.BTN_START){
				GFX->AppExit();
				goto end;
			}
		}
		BMap.DrawBitmap(&Precalculated_Layer);
		IMG.DrawIMG(imgX,imgY,png);
		F1.Printf(150,100,COLOR_RED,60,"FPS %f", fps);

		GFX->Flip();
		frame ++;
	}
	*/
	GFX->AppStart();
	while(GFX->GetAppStatus()){
		static time_t starttime = 0;
		double fps = 0;
		if (starttime == 0) starttime = time (NULL);
		else fps = frame / difftime (time (NULL), starttime);
		ioPadGetInfo(&padinfo);
		if(padinfo.status[0]){
			ioPadGetData(0, &paddata);
			if(paddata.BTN_TRIANGLE){
				GFX->AppExit();
			}
			if(paddata.BTN_START){
				GFX->AppExit();
				goto end;
			}
		}
		BG.Mono(0xb4e83a);
		F1.Printf(150,100,COLOR_RED,60,"FPS %f", fps);
		F1.Printf(150,200,COLOR_RED,"Screen %d x %d",GFX->width,GFX->height);
		F1.Printf(150,250,COLOR_BLUE, 35,"Press /\\ to exit! (Start to skip Message Dialogs and exit)");
		F2.Printf(150,300,COLOR_GREEN,60,"FreeType2 with TTF support :)");
		F3.Printf(150,500,"Written by deroad");
		IMG.DrawIMG(imgX,imgY,png);
		GFX->RescaleFlip();
		frame ++;
	}
	if(GFX->ExitSignalStatus()) goto end;

	//You need to clean the Bitmap before exit
	BMap.ClearBitmap(&Precalculated_Layer);

	Msg.TimerErrorDialog(0xdeadbeef, 5000.f);

	Msg.TimerDialog(MSG_OK, "Timer Dialog!", 5000.f);
	Msg.TimerErrorDialog(0xdeadbeef, 5000.f);


	GFX->AppStart();
	frame = 0;
	Msg.SingleProgressBarDialog("Single progress bar!!", "Deroad Bar text");
	while(GFX->GetAppStatus() && Bx<100){
		Msg.ProgressBarDialogFlip();
		frame ++;
		if(frame%55==0){
			Msg.SingleProgressBarDialogIncrease(10);
			Bx+=10;
		}
	}
	Msg.ProgressBarDialogAbort();


	GFX->AppStart();
	Msg.DoubleProgressBarDialog("Double progress bar!!", "Deroad Bar1 text", "Deroad Bar2 text");
	Bx=0;
	By=0;
	while(GFX->GetAppStatus() && By<=100){
		Msg.ProgressBarDialogFlip();
		frame ++;
		if(frame%55==0){
			Bx+=10;
			Msg.DoubleProgressBarDialogIncreaseFirstBar(10);
		 }

		if(Bx>100){
			Bx=0;
			Msg.DoubleProgressBarDialogResetFirstBar();
			Msg.DoubleProgressBarDialogIncreaseSecondBar(20);
			By+=20;
		}
	}
	Msg.ProgressBarDialogAbort();
end:
	GFX->NoRSX_Exit();
	ioPadEnd();
	return 0;
}
Exemplo n.º 10
0
View2DWindow::View2DWindow(wxWindow* parent,int axis_)
        : wxPanel(parent)
{
#define IMG(fn) wxBitmap(wxString("./Images/")+wxString(fn)+wxString(".bmp"),wxBITMAP_TYPE_ANY)

	v2d = new View2D(this);
	sc = new wxScrollBar(this,V2D_ACTION_SCROLL,wxDefaultPosition,wxDefaultSize,wxSB_VERTICAL);
	v2d->axis = axis_;
	v2d->axis_x = !axis_;
	v2d->axis_y = 2-(axis_==2);

	info = new wxStaticText(this,wxID_ANY,"qwe");
//	tbtn_arrow = new wxToggleButton(this,V2D_ACTION_ARROW,"Arrow");
//	tbtn_translate = new wxToggleButton(this,V2D_ACTION_TRANSLATE,"Move");
//	tbtn_zoom = new wxToggleButton(this,V2D_ACTION_ZOOM,"Zoom");

	m_box = new wxChoice(this,V2D_ACTION_CHOISE);
	m_box->Append(MY_TXT("Slice","Слой"));
	m_box->Append(MY_TXT("Simple average","Среднее"));
	m_box->Append(MY_TXT("Maximum","Максимум"));
	m_box->Select(0);

	wxButton*btn_mirror_Ox = new wxBitmapButton(this,V2D_ACTION_MIRROR_OX,IMG("mirror_Ox"));
	btn_mirror_Ox->Show(0);
	btn_mirror_Ox->SetToolTip(MY_TXT("Mirror(V)","Отразить по вертикали"));
	wxButton*btn_mirror_Oy = new wxBitmapButton(this,V2D_ACTION_MIRROR_OY,IMG("mirror_Oy"));
	btn_mirror_Oy->Show(0);
	btn_mirror_Oy->SetToolTip(MY_TXT("Mirror(H)","Отразить по горизонтали"));

	wxButton*btn_up = new wxBitmapButton(this,V2D_ACTION_UP,IMG("update_texture_2d"));
	btn_up->SetToolTip(MY_TXT("Update","Обновить"));
	m_check_box_use_bicubic_filt = new wxCheckBox(this,V2D_ACTION_CHECKBOX,MY_TXT("Bicubic filtering","Бикубическая фильтрация"));
	m_check_box_use_bicubic_filt->SetValue(1);
	wxSizer* sz = new wxBoxSizer(wxVERTICAL);
	wxSizer* sz1 = new wxBoxSizer(wxHORIZONTAL);
	wxSizer* sz2 = new wxBoxSizer(wxHORIZONTAL);

//	sz1->Add(tbtn_arrow,0,wxSTRETCH_NOT);
//	sz1->Add(tbtn_translate,0,wxSTRETCH_NOT);
//	sz1->Add(tbtn_zoom,0,wxSTRETCH_NOT);
	


	v2d->par = this;
	sz1->Add(v2d,1,wxEXPAND);
	sz1->Add(sc,0,wxEXPAND);

	sz2->Add(m_box,1,wxSTRETCH_NOT);
	sz2->AddSpacer(10);
	sz2->Add(btn_mirror_Ox,0,wxSTRETCH_NOT);
	sz2->Add(btn_mirror_Oy,0,wxSTRETCH_NOT);
	sz2->Add(btn_up,0,wxSTRETCH_NOT);
	sz2->AddSpacer(20);
	sz2->Add(m_check_box_use_bicubic_filt,0,wxSTRETCH_NOT);
	sz2->AddSpacer(20);
	sz2->Add(info,0,wxSTRETCH_NOT);


	sz->Add(sz1,1,wxEXPAND);
	sz->Add(sz2,0,wxSTRETCH_NOT);


	SetSizer(sz);
}
Exemplo n.º 11
0
Heart::Heart() {
  init_anim(&heart_anim, OFF, 0);
  add_frame(&heart_anim, IMG("heart.bmp"));

  anim = &heart_anim;
}
Exemplo n.º 12
0
void IMGTest::testPikesPeakNFS() {
    std::ifstream f("test/stelprdb5350805.img", std::ifstream::binary);

    IMG img = IMG(f);
}
Exemplo n.º 13
0
void IMGTest::testColo24k() {
    std::ifstream f("test/Colorado 24K Topos.img", std::ifstream::binary);

    IMG img = IMG(f);
}