home *** CD-ROM | disk | FTP | other *** search
- program UPCASE;
-
- // Makro prevede oznaceny text do velkych pismen
- // s tim, ze pocatky slov budou mit o const vetsi
- // velikost, nez zbytek slova
-
- const
- rozdil = 2;
- aux_size = 12;
-
- var
- startsel, endsel, vel : integer;
-
- begin
- if not IsBlockSelected then
- begin
- Info_Box("Zprßva", "Nenφ oznaΦen blok");
- halt;
- end;
-
- if GetSelEndPos = GetCaretPos then
- ChangeSelRanges;
- startsel := GetSelStartPos;
- endsel := GetSelEndPos;
- UnselectBlock;
- vel := GetFormatFont(kCHPSize);
- { casti oznaceneho textu mohou mit ruzne velikosti pisma : }
- if vel = kAmbiguous then
- vel := aux_size;
- while GetSelStartPos < endsel do
- begin
- CharRight(1, TRUE);
- SetFormatFont(kCHPsize, vel);
- SetFormatFont(kCHPcaps, kOn);
- UnselectBlock;
- RightOfWord(TRUE);
- SetFormatFont(kCHPsize, vel - rozdil);
- SetFormatFont(kCHPcaps, kOn);
- WordRight;
- end;
- end.