summaryrefslogtreecommitdiff
path: root/iup/test/split.c
blob: 7576e782bb1e6b63ee274bcae7a35ca5389718ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include <stdio.h>
#include "iup.h"

void SplitTest(void)
{
  Ihandle *dlg, *bt, *split, *ml, *vbox;

  bt = IupButton("Button", NULL);
  IupSetAttribute(bt, "EXPAND", "YES");
//  IupSetAttribute(bt, "MINSIZE", "30x");

  ml = IupMultiLine(NULL);
  IupSetAttribute(ml, "EXPAND", "YES");
  IupSetAttribute(ml, "VISIBLELINES", "5");
  IupSetAttribute(ml, "VISIBLECOLUMNS", "10");
  
  split = IupSplit(bt, ml);
//  IupSetAttribute(split, "DIRECTION", "VERTICAL");
//  IupSetAttribute(split, "DIRECTION", "HORIZONTAL");
//  IupSetAttribute(split, "COLOR", "127 127 255");
//  IupSetAttribute(split, "LAYOUTDRAG", "NO");
//  IupSetAttribute(split, "AUTOHIDE", "YES");
//  IupSetAttribute(split, "SHOWGRIP", "NO");
//  IupSetAttribute(split, "MINMAX", "100:800");

  vbox = IupVbox(split, NULL);
  IupSetAttribute(vbox, "MARGIN", "10x10");
  IupSetAttribute(vbox, "GAP", "10");

  dlg = IupDialog(vbox);
  IupSetAttribute(dlg, "TITLE", "IupSplit Example");

  IupShow(dlg);
}

#ifndef BIG_TEST
int main(int argc, char* argv[])
{
  IupOpen(&argc, &argv);

  SplitTest();

  IupMainLoop();

  IupClose();

  return EXIT_SUCCESS;
}
#endif