//---------------------------------------------------------------------------
GUI_Main_Sheet::GUI_Main_Sheet(Core* _C, wxWindow* parent)
    : wxPanel(parent, -1, wxPoint(0, 0), wxSize(parent->GetClientSize().GetWidth()-0, parent->GetClientSize().GetHeight()-0)),
    GUI_Main_Common_Core(_C)
{
    //Update
    GUI_Refresh();
}
//---------------------------------------------------------------------------
GUI_Main_Easy_Box::GUI_Main_Easy_Box(Core* _C, GUI_Main_Easy* Parent, wxWindow* Left, wxWindow* Top, stream_t StreamKind, size_t StreamPos)
    : wxPanel(Parent, 26991, wxPoint(0, 0), wxSize(Parent->GetClientSize().GetWidth()-0, Parent->GetClientSize().GetHeight()-0)),
      GUI_Main_Easy_Box_Core(_C, Parent, StreamKind, StreamPos)
{
    //Internal
    GUI_Main_Easy_Box::Parent=Parent;
    GUI_Main_Easy_Box::Left=Left;
    GUI_Main_Easy_Box::Top=Top;

    //Creation
    Box=new wxStaticBox  (this, 26991, wxEmptyString);
    Text=new wxStaticText(this, 26991, wxEmptyString);
    Tags=new wxStaticText(this, 26991, wxEmptyString);
    Button=new wxButton  (this, 26991, wxEmptyString);

    //Drag and Drop
#if wxUSE_DRAG_AND_DROP && defined(__WXMAC__)
    SetDropTarget(new FileDrop(_C));
    Box->SetDropTarget(new FileDrop(_C));
    Text->SetDropTarget(new FileDrop(_C));
    Tags->SetDropTarget(new FileDrop(_C));
    Button->SetDropTarget(new FileDrop(_C));
#endif //wxUSE_DRAG_AND_DROP

    //Update
    GUI_Resize();
    GUI_Refresh();
}
//---------------------------------------------------------------------------
GUI_Main_Easy::GUI_Main_Easy(Core* _C, wxWindow* parent)
    : wxPanel(parent, 26981, wxPoint(0, 0), wxSize(parent->GetClientSize().GetWidth()-0, parent->GetClientSize().GetHeight()-0)),
    GUI_Main_Easy_Core(_C)
{
    //Creation - Select
    Select=new wxChoice(this, 26981);

    //Creation - Other
    Boxes.resize(Stream_Max);
    for (size_t StreamPos=0; StreamPos<Stream_Max; StreamPos++)
    {
        Boxes[StreamPos].resize(Boxes_Count_Get(StreamPos));
        for (size_t Pos=0; Pos<Boxes[StreamPos].size(); Pos++)
            Boxes[StreamPos][Pos]=new GUI_Main_Easy_Box(C, this, Pos==0?NULL:Boxes[StreamPos][Pos-1], StreamPos==0?(wxWindow*)Select:(wxWindow*)Boxes[StreamPos-1][0], (stream_t)StreamPos, Pos);
    }

    //Drag and Drop
    #if wxUSE_DRAG_AND_DROP && defined(__WXMAC__)
        SetDropTarget(new FileDrop(C));
        Select->SetDropTarget(new FileDrop(C));
    #endif //wxUSE_DRAG_AND_DROP

    //Update
    GUI_Resize();
    GUI_Refresh();
}
//---------------------------------------------------------------------------
GUI_Main_Text::GUI_Main_Text(Core* _C, TWinControl* Owner)
    : GUI_Main_Common_Core(_C)
{
    //VCL specific
    VCL=new TMemo(Owner);
    VCL->Parent=Owner;

    //Update
    GUI_Refresh();
}
//---------------------------------------------------------------------------
GUI_Main_HTML::GUI_Main_HTML(Core* _C, TWinControl* Owner)
    : GUI_Main_Common_Core(_C)
{
    //VCL specific
    VCL=new TCppWebBrowser(Owner);
    //VCL->Parent=Owner;

    //Update
    GUI_Refresh();
}
//---------------------------------------------------------------------------
GUI_Main_Tree::GUI_Main_Tree(Core* _C, TWinControl* Owner)
    : GUI_Main_Common_Core(_C)
{
    //VCL specific
    VCL=new TTreeView(Owner);
    VCL->Parent=Owner;

    //Update
    GUI_Refresh();
}
Esempio n. 7
0
//---------------------------------------------------------------------------
GUI_Main_Easy::GUI_Main_Easy(Core* Core_, TWinControl* Owner)
    : GUI_Main_Common_Core(Core_)
{
    //VCL
    VCL=new TPanel(Owner);
    VCL->Parent=Owner;

    //Creation - Select
    Select=new TComboBox(Owner);
    Select->Parent=Owner;

    //Update
    GUI_Refresh();
}
//---------------------------------------------------------------------------
GUI_Main_HTML::GUI_Main_HTML(Core* _C, wxWindow* parent)
    : wxHtmlWindow(parent, -1, wxPoint(1, 1), wxSize(parent->GetClientSize().GetWidth()-1, parent->GetClientSize().GetHeight()-1)),
    GUI_Main_Common_Core(_C)
{
    int Size[7]={ 7, 8, 10, 12, 16, 22, 30};
    SetFonts(wxEmptyString, wxEmptyString, Size);

    //Drag and Drop
    #if wxUSE_DRAG_AND_DROP && defined(__WXMAC__)
        SetDropTarget(new FileDrop(C));
    #endif //wxUSE_DRAG_AND_DROP

    //Update
    GUI_Refresh();
}
//---------------------------------------------------------------------------
GUI_Main_Easy_Box::GUI_Main_Easy_Box(Core* _C, GUI_Main_Easy* Parent, wxWindow* Left, wxWindow* Top, stream_t StreamKind, size_t StreamPos)
    : wxPanel(Parent, 26991, wxPoint(0, 0), wxSize(Parent->GetClientSize().GetWidth()-0, Parent->GetClientSize().GetHeight()-0)),
    GUI_Main_Easy_Box_Core(_C, Parent, StreamKind, StreamPos)
{
    //Internal
    GUI_Main_Easy_Box::Parent=Parent;
    GUI_Main_Easy_Box::Left=Left;
    GUI_Main_Easy_Box::Top=Top;

    //Creation
    Box=new wxStaticBox  (this, 26991, wxEmptyString);
    Text=new wxStaticText(this, 26991, wxEmptyString);
    Tags=new wxStaticText(this, 26991, wxEmptyString);
    Button=new wxButton  (this, 26991, wxEmptyString);

    //Update
    GUI_Resize();
    GUI_Refresh();
}
Esempio n. 10
0
//---------------------------------------------------------------------------
GUI_Main_Text::GUI_Main_Text(Core* _C, wxWindow* parent)
    : wxTextCtrl(parent, -1, __T(""), wxPoint(0, 0), wxSize(parent->GetClientSize().GetWidth()-0, parent->GetClientSize().GetHeight()-0), wxTE_READONLY|wxTE_MULTILINE|wxTE_RICH|wxTE_RICH2),
    GUI_Main_Common_Core(_C)
{
    wxFont Font;
    Font.SetFamily(wxFONTFAMILY_MODERN);
    wxTextAttr Attr;
    Attr.SetFont(Font);
    //Attr.SetFontSize(8);
    SetDefaultStyle(Attr);

    //Drag and Drop
    #if wxUSE_DRAG_AND_DROP && defined(__WXMAC__)
        SetDropTarget(new FileDrop(C));
    #endif //wxUSE_DRAG_AND_DROP

    //Update
    GUI_Refresh();
}
Esempio n. 11
0
//---------------------------------------------------------------------------
GUI_Main_Easy::GUI_Main_Easy(Core* _C, wxWindow* parent)
    : wxPanel(parent, 26981, wxPoint(0, 0), wxSize(parent->GetClientSize().GetWidth()-0, parent->GetClientSize().GetHeight()-0)),
    GUI_Main_Easy_Core(_C)
{
    //Creation - Select
    Select=new wxChoice(this, 26981);

    //Creation - Other
    Boxes.resize(Stream_Max);
    for (size_t StreamPos=0; StreamPos<Stream_Max; StreamPos++)
    {
        Boxes[StreamPos].resize(Boxes_Count_Get(StreamPos));
        for (size_t Pos=0; Pos<Boxes[StreamPos].size(); Pos++)
            Boxes[StreamPos][Pos]=new GUI_Main_Easy_Box(C, this, Pos==0?NULL:Boxes[StreamPos][Pos-1], StreamPos==0?(wxWindow*)Select:(wxWindow*)Boxes[StreamPos-1][0], (stream_t)StreamPos, Pos);
    }

    //Update
    GUI_Resize();
    GUI_Refresh();
}
Esempio n. 12
0
static void ReadSpeedDial(void)
{
	PhonebookEntry *pbEntry;
	D_SpeedDial *d;
	PhoneEvent *e;
	gchar *row[3];
	gchar buf[2] = " ";
	gint location;
	register gint i, row_i = 0;


	if (!GUI_ContactsIsIntialized())
		GUI_ReadContacts();

	gtk_label_set_text(GTK_LABEL(infoDialog.text), _("Reading data ..."));
	gtk_widget_show_now(infoDialog.dialog);
	GUI_Refresh();

	gtk_clist_freeze(GTK_CLIST(clist));
	gtk_clist_clear(GTK_CLIST(clist));

	for (i = 2; i < 10; i++) {
		if ((d = (D_SpeedDial *) g_malloc(sizeof(D_SpeedDial))) == NULL) {
			g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__);
			return;
		}
		memset(d, 0, sizeof(D_SpeedDial));
		d->entry.number = i;
		if ((e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent))) == NULL) {
			g_print(_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__);
			g_free(d);
			return;
		}
		e->event = Event_GetSpeedDial;
		e->data = d;
		GUI_InsertEvent(e);
		pthread_mutex_lock(&speedDialMutex);
		pthread_cond_wait(&speedDialCond, &speedDialMutex);
		pthread_mutex_unlock(&speedDialMutex);
		if (d->status != GN_ERR_NONE) {
			g_print(_("Cannot read speed dial key %d!\n"), i);
			*buf = i + '0';
			row[0] = buf;
			row[1] = '\0';
			row[2] = '\0';
		} else {
			if (d->entry.location == 0)
				location = i;
			else
				location = d->entry.location;
			if ((pbEntry = GUI_GetEntry(d->entry.memory_type, location)) == NULL) {
				g_free(d);
				continue;
			}
			*buf = i + '0';
			row[0] = buf;
			row[1] = pbEntry->entry.name;
			row[2] = pbEntry->entry.number;

		}
		gtk_clist_append(GTK_CLIST(clist), row);
		gtk_clist_set_row_data_full(GTK_CLIST(clist), row_i++,
					    (gpointer) d, DestroyCListData);
		/*
		GUI_Refresh ();
		*/
	}
	gtk_widget_hide(infoDialog.dialog);
		
	gtk_clist_sort(GTK_CLIST(clist));
	gtk_clist_thaw(GTK_CLIST(clist));
	speedDialInitialized = TRUE;
}