English | Magyar
JS ki | CSS ki | Ékezetek ki | HiContrast
Lapozó:  (0 - 1424) 
<== | ==>
Ugrás a végére | Összes megjelenítése | Utolsó oldal
OpenOpera patches | Opera-SSL patches | Opera 12.15 source (Git repository) | Opera 12.15 source (Torrent) | Opera internal pages | Otter Browser Linux x64 - Qt5.15.2/QtWebKit5.602.1 (2024.04.27. 20:05)
OS for MC680x0 | OS for PPC | OS for Sparc64 | besztofbégéaefcé | CSÉNDZSLOG | WebToolz | DDG Shit Filter | Google Shit Filter | Progz | Fast CSS Box | Browser | OS | Agent | Statisztika | BBCode
Monospace font-family: Courier New | Browser default monospace
Email értesítő / Email notification ===> 
Keresés
Σ: 1 post

kemi  (statz) Főfasz
#2, Főfasz (2970)
1517 | #2106 | ^ | Idézet | Tue, 23 Oct 2012 09:08:00 +02
92.249.*.* Linux x86 Google Chrome Hungary 92.249.*.*
Van egy nagy struct, meg egy csomó függvény ami beállít meg kiszed belőle dolgokat. A struct csak adatszerkezet (kb. mintha statikus mezőid lennének), de ha már vannak függvények (metódusok) amik dolgoznak rajta, a belső adatokat pedig elfedik a használó elől az már OOP. Pl. Így néz ki a fájlokat beállító függvény:
void on_button_set_files_clicked(GtkWidget* widget, gpointer data) {
	GtkWidget* opendialog = gtk_file_chooser_dialog_new("Input file",
							    GTK_WINDOW(window),
							    GTK_FILE_CHOOSER_ACTION_OPEN,
							    GTK_STOCK_OPEN, GTK_RESPONSE_OK,
							    GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
							    NULL);
	GtkResponseType open_response = gtk_dialog_run(GTK_DIALOG(opendialog));
	char* infile = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(opendialog));
	gtk_widget_destroy(opendialog);
	GtkWidget* savedialog = gtk_file_chooser_dialog_new("Output file",
							    GTK_WINDOW(window),
							    GTK_FILE_CHOOSER_ACTION_SAVE,
							    GTK_STOCK_SAVE, GTK_RESPONSE_OK,
							    GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
							    NULL);
	GtkResponseType save_response = gtk_dialog_run(GTK_DIALOG(savedialog));
	char* outfile = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(savedialog));
	gtk_widget_destroy(savedialog);

	if (open_response == GTK_RESPONSE_OK && save_response == GTK_RESPONSE_OK) {
		gtk_entry_set_text(GTK_ENTRY(entry_infile), infile);
		gtk_entry_set_text(GTK_ENTRY(entry_outfile), outfile);
		files_set = 1;
	}
}


English | Magyar
JS ki | CSS ki | Ékezetek ki | HiContrast
Lapozó:  (0 - 1424) 
<== | ==>
Ugrás a végére | Összes megjelenítése | Utolsó oldal
OpenOpera patches | Opera-SSL patches | Opera 12.15 source (Git repository) | Opera 12.15 source (Torrent) | Opera internal pages | Otter Browser Linux x64 - Qt5.15.2/QtWebKit5.602.1 (2024.04.27. 20:05)
OS for MC680x0 | OS for PPC | OS for Sparc64 | besztofbégéaefcé | CSÉNDZSLOG | WebToolz | DDG Shit Filter | Google Shit Filter | Progz | Fast CSS Box | Browser | OS | Agent | Statisztika | BBCode
Monospace font-family: Courier New | Browser default monospace
Email értesítő / Email notification ===> 
Keresés

Név: (max 255 byte)

Email: (max 255 byte) Nem kötelező!

Üzenet: (max 65536 kar.) 65536-0=65536




crap_vkn v4.34.0 by TCH
Thx to saxus for the escaped string decoder function (PHP), the realIP function (PHP) & the SQL handle layer (PHP), to thookerov for the int_divide function (PHP), to Jeff Anderson for the getSelText function (JS), to Alex King for the insertAtCursor function (JS), Flood3r for the new CSS styles, Pety for the spamprotection idea and some design and comfort ideas, MaxMind for the IP2Country database, famfamfam for the flags of countries and an unknown PHP programmer for the removeAccents function.



Kecskebaszók ide!